* lisp/progmodes/pascal.el (pascal-font-lock-keywords): Fix incorrect format

entry; use symbol boundaries to avoid mis-matches.
This commit is contained in:
Feng Li 2014-04-10 09:56:28 -04:00 committed by Stefan Monnier
parent bcbb83a92d
commit 39764caa7f
3 changed files with 15 additions and 11 deletions

View file

@ -1,3 +1,8 @@
2014-04-10 Feng Li <fengli@gmail.com> (tiny change)
* progmodes/pascal.el (pascal-font-lock-keywords): Fix incorrect format
entry; use symbol boundaries to avoid mis-matches.
2014-04-10 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-file-name-handler)

View file

@ -166,21 +166,19 @@
(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)
(,(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 "\\<\\("
,(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))
"\\)\\_>")
("\\_<\\(goto\\)\\_>[ \t]*\\([0-9]+\\)?"
(1 font-lock-keyword-face) (2 font-lock-keyword-face t)))
"Additional expressions to highlight in Pascal mode.")
(defconst pascal--syntax-propertize

View file

@ -29,6 +29,7 @@
// Free-pascal style comment.
var x:Char = 12 /* 45; // This /* does not start a comment.
var x:Char = (/ 4); // This (/ does not start a comment.
var a_to_b : integer; // 'to' should not be highlighted
program CRTDemo;