]> git.eshelyaron.com Git - emacs.git/commitdiff
(c-font-lock-keywords-2): Do not require labels to be alone on the line.
authorSam Steingold <sds@gnu.org>
Fri, 26 Oct 2001 15:04:58 +0000 (15:04 +0000)
committerSam Steingold <sds@gnu.org>
Fri, 26 Oct 2001 15:04:58 +0000 (15:04 +0000)
lisp/ChangeLog
lisp/font-lock.el

index b7833ed0782b7faaeec3c257a3b08cdae66f6725..198c4af72c226a616a9f49267018f077ab9ffd8d 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-26  Sam Steingold  <sds@gnu.org>
+
+       * font-lock.el (c-font-lock-keywords-2): Do not require labels to
+       be alone on the line.
+
 2001-10-26  Eli Zaretskii  <eliz@is.elta.co.il>
 
        * button.el (button): Special face definition for MS-DOS
index ef4bf6f2836a768024e7406bb056a942b789ccb2..b1c00274a0df38d2dc1cdde65eacc2b695f45137 100644 (file)
@@ -2332,12 +2332,7 @@ See also `c-font-lock-extra-types'.")
        (save-excursion (skip-chars-forward "^:\n") (point))
        nil
        (1 font-lock-constant-face nil t)))
-    ;; Anders Lindgren <andersl@andersl.com> points out that it is quicker to
-    ;; use MATCH-ANCHORED to effectively anchor the regexp on the left.
-    ;; This must come after the one for keywords and targets.
-    '(":" ("^[ \t]*\\(\\sw+\\)[ \t]*:[ \t]*$"
-          (beginning-of-line) (end-of-line)
-          (1 font-lock-constant-face)))
+    '("\\(\\sw+\\)[ \t]*:" 1 font-lock-constant-face)
     )))
 
  (setq c-font-lock-keywords-3
@@ -2372,10 +2367,10 @@ See also `c-font-lock-extra-types'.")
          (list 1 'font-lock-keyword-face)
          (list ,(+ c-type-specs-depth 2) 'font-lock-type-face nil t)
          (list 'font-lock-match-c-style-declaration-item-and-skip-to-next
-                 nil 
+                 nil
                  ;; Finish with point after the variable name if
                  ;; there is one.
-                 `(if (match-end 2) 
+                 `(if (match-end 2)
                       (goto-char (match-end 2)))
                  ;; Fontify as a variable or function name.
                  '(1 (if (match-beginning 2)