# HG changeset patch # User Sam Steingold # Date 1004108698 0 # Node ID 6a06f9b1f4483fa05f8b9894ce03288e0385cc60 # Parent ffc4cf9a7cbd67f63788ab259106626e372639f8 (c-font-lock-keywords-2): Do not require labels to be alone on the line. diff -r ffc4cf9a7cbd -r 6a06f9b1f448 lisp/ChangeLog --- a/lisp/ChangeLog Fri Oct 26 14:25:06 2001 +0000 +++ b/lisp/ChangeLog Fri Oct 26 15:04:58 2001 +0000 @@ -1,3 +1,8 @@ +2001-10-26 Sam Steingold + + * font-lock.el (c-font-lock-keywords-2): Do not require labels to + be alone on the line. + 2001-10-26 Eli Zaretskii * button.el (button): Special face definition for MS-DOS diff -r ffc4cf9a7cbd -r 6a06f9b1f448 lisp/font-lock.el --- a/lisp/font-lock.el Fri Oct 26 14:25:06 2001 +0000 +++ b/lisp/font-lock.el Fri Oct 26 15:04:58 2001 +0000 @@ -2332,12 +2332,7 @@ (save-excursion (skip-chars-forward "^:\n") (point)) nil (1 font-lock-constant-face nil t))) - ;; Anders Lindgren 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 @@ (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)