-(defconst pascal-font-lock-keywords (purecopy
- (list
- '("^[ \t]*\\(function\\|pro\\(cedure\\|gram\\)\\)\\>[ \t]*\\([a-z]\\)"
- 1 font-lock-keyword-face)
- '("^[ \t]*\\(function\\|pro\\(cedure\\|gram\\)\\)\\>[ \t]*\\([a-z][a-z0-9_]*\\)"
- 3 font-lock-function-name-face t)
-; ("type" "const" "real" "integer" "char" "boolean" "var"
-; "record" "array" "file")
- (cons (concat "\\<\\(array\\|boolean\\|c\\(har\\|onst\\)\\|file\\|"
- "integer\\|re\\(al\\|cord\\)\\|type\\|var\\)\\>")
- 'font-lock-type-face)
- '("\\<\\(label\\|external\\|forward\\)\\>" . font-lock-constant-face)
- '("\\<\\([0-9]+\\)[ \t]*:" 1 font-lock-function-name-face)
-; ("of" "to" "for" "if" "then" "else" "case" "while"
-; "do" "until" "and" "or" "not" "in" "with" "repeat" "begin" "end")
- (concat "\\<\\("
- "and\\|begin\\|case\\|do\\|e\\(lse\\|nd\\)\\|for\\|i[fn]\\|"
- "not\\|o[fr]\\|repeat\\|t\\(hen\\|o\\)\\|until\\|w\\(hile\\|ith\\)"
- "\\)\\>")
- '("\\<\\(goto\\)\\>[ \t]*\\([0-9]+\\)?"
- 1 font-lock-keyword-face)
- '("\\<\\(goto\\)\\>[ \t]*\\([0-9]+\\)?"
- 2 font-lock-keyword-face t)))
+(defconst pascal-font-lock-keywords
+ `(("\\_<\\(function\\|pro\\(cedure\\|gram\\)\\)[ \t]+\\([[:alpha:]][[:alnum:]_]*\\)"
+ (1 font-lock-keyword-face)
+ (3 font-lock-function-name-face))
+ ;; ("type" "const" "real" "integer" "char" "boolean" "var"
+ ;; "record" "array" "file")
+ (,(concat "\\_<\\(array\\|boolean\\|c\\(har\\|onst\\)\\|file\\|"
+ "integer\\|re\\(al\\|cord\\)\\|type\\|var\\)\\_>")
+ . font-lock-type-face)
+ ("\\_<\\(label\\|external\\|forward\\)\\_>" . font-lock-constant-face)
+ ("\\_<\\([0-9]+\\)[ \t]*:" 1 font-lock-function-name-face)
+ ;; ("of" "to" "for" "if" "then" "else" "case" "while"
+ ;; "do" "until" "and" "or" "not" "in" "with" "repeat" "begin" "end")
+ ,(concat "\\_<\\("
+ "and\\|begin\\|case\\|do\\|e\\(lse\\|nd\\)\\|for\\|i[fn]\\|"
+ "not\\|o[fr]\\|repeat\\|t\\(hen\\|o\\)\\|until\\|w\\(hile\\|ith\\)"
+ "\\)\\_>")
+ ("\\_<\\(goto\\)\\_>[ \t]*\\([0-9]+\\)?"
+ (1 font-lock-keyword-face) (2 font-lock-keyword-face t)))