diff options
| author | Sam Steingold | 2001-10-26 15:04:58 +0000 |
|---|---|---|
| committer | Sam Steingold | 2001-10-26 15:04:58 +0000 |
| commit | 07fedaed794d0932fff6575baa3060525c514dde (patch) | |
| tree | d77d559b60f9dec85b188e562bfc55f7333d086b | |
| parent | d4e34d243c15588195c7cd46b276d5a697260e9b (diff) | |
| download | emacs-07fedaed794d0932fff6575baa3060525c514dde.tar.gz emacs-07fedaed794d0932fff6575baa3060525c514dde.zip | |
(c-font-lock-keywords-2): Do not require labels to be alone on the line.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/font-lock.el | 11 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b7833ed0782..198c4af72c2 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2001-10-26 Sam Steingold <sds@gnu.org> | ||
| 2 | |||
| 3 | * font-lock.el (c-font-lock-keywords-2): Do not require labels to | ||
| 4 | be alone on the line. | ||
| 5 | |||
| 1 | 2001-10-26 Eli Zaretskii <eliz@is.elta.co.il> | 6 | 2001-10-26 Eli Zaretskii <eliz@is.elta.co.il> |
| 2 | 7 | ||
| 3 | * button.el (button): Special face definition for MS-DOS | 8 | * button.el (button): Special face definition for MS-DOS |
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index ef4bf6f2836..b1c00274a0d 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -2332,12 +2332,7 @@ See also `c-font-lock-extra-types'.") | |||
| 2332 | (save-excursion (skip-chars-forward "^:\n") (point)) | 2332 | (save-excursion (skip-chars-forward "^:\n") (point)) |
| 2333 | nil | 2333 | nil |
| 2334 | (1 font-lock-constant-face nil t))) | 2334 | (1 font-lock-constant-face nil t))) |
| 2335 | ;; Anders Lindgren <andersl@andersl.com> points out that it is quicker to | 2335 | '("\\(\\sw+\\)[ \t]*:" 1 font-lock-constant-face) |
| 2336 | ;; use MATCH-ANCHORED to effectively anchor the regexp on the left. | ||
| 2337 | ;; This must come after the one for keywords and targets. | ||
| 2338 | '(":" ("^[ \t]*\\(\\sw+\\)[ \t]*:[ \t]*$" | ||
| 2339 | (beginning-of-line) (end-of-line) | ||
| 2340 | (1 font-lock-constant-face))) | ||
| 2341 | ))) | 2336 | ))) |
| 2342 | 2337 | ||
| 2343 | (setq c-font-lock-keywords-3 | 2338 | (setq c-font-lock-keywords-3 |
| @@ -2372,10 +2367,10 @@ See also `c-font-lock-extra-types'.") | |||
| 2372 | (list 1 'font-lock-keyword-face) | 2367 | (list 1 'font-lock-keyword-face) |
| 2373 | (list ,(+ c-type-specs-depth 2) 'font-lock-type-face nil t) | 2368 | (list ,(+ c-type-specs-depth 2) 'font-lock-type-face nil t) |
| 2374 | (list 'font-lock-match-c-style-declaration-item-and-skip-to-next | 2369 | (list 'font-lock-match-c-style-declaration-item-and-skip-to-next |
| 2375 | nil | 2370 | nil |
| 2376 | ;; Finish with point after the variable name if | 2371 | ;; Finish with point after the variable name if |
| 2377 | ;; there is one. | 2372 | ;; there is one. |
| 2378 | `(if (match-end 2) | 2373 | `(if (match-end 2) |
| 2379 | (goto-char (match-end 2))) | 2374 | (goto-char (match-end 2))) |
| 2380 | ;; Fontify as a variable or function name. | 2375 | ;; Fontify as a variable or function name. |
| 2381 | '(1 (if (match-beginning 2) | 2376 | '(1 (if (match-beginning 2) |