emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 r116932: * lisp/progmodes/pascal.el (pascal-font-


From: Stefan Monnier
Subject: [Emacs-diffs] emacs-24 r116932: * lisp/progmodes/pascal.el (pascal-font-lock-keywords): Fix incorrect format
Date: Thu, 10 Apr 2014 13:56:39 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116932
revision-id: address@hidden
parent: address@hidden
author: Feng Li <address@hidden>
committer: Stefan Monnier <address@hidden>
branch nick: emacs-24
timestamp: Thu 2014-04-10 09:56:28 -0400
message:
  * lisp/progmodes/pascal.el (pascal-font-lock-keywords): Fix incorrect format
  entry; use symbol boundaries to avoid mis-matches.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/progmodes/pascal.el       pascal.el-20091113204419-o5vbwnq5f7feedwu-636
  test/indent/pascal.pas         pascal.pas-20111213152608-1lfkfh2fgqkiq72i-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-04-10 07:17:40 +0000
+++ b/lisp/ChangeLog    2014-04-10 13:56:28 +0000
@@ -1,3 +1,8 @@
+2014-04-10  Feng Li  <address@hidden>  (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  <address@hidden>
 
        * net/tramp.el (tramp-file-name-handler)

=== modified file 'lisp/progmodes/pascal.el'
--- a/lisp/progmodes/pascal.el  2014-03-14 00:22:33 +0000
+++ b/lisp/progmodes/pascal.el  2014-04-10 13:56:28 +0000
@@ -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

=== modified file 'test/indent/pascal.pas'
--- a/test/indent/pascal.pas    2014-01-10 07:10:37 +0000
+++ b/test/indent/pascal.pas    2014-04-10 13:56:28 +0000
@@ -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;
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]