diff options
| author | Glenn Morris | 2008-03-13 03:25:20 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-03-13 03:25:20 +0000 |
| commit | 071e627782e4d44d645ee1207c06e36aab6717a5 (patch) | |
| tree | 7f2578c4a92d0b44f3b75ea2e5963545a1ef0f4a | |
| parent | b201914160288575be9b878cf1f0bf53ec5b40c1 (diff) | |
| download | emacs-071e627782e4d44d645ee1207c06e36aab6717a5.tar.gz emacs-071e627782e4d44d645ee1207c06e36aab6717a5.zip | |
(lisp-font-lock-keywords-1): Support wider range of
generate-autoload-cookie patterns.
| -rw-r--r-- | lisp/font-lock.el | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 7d607b3a52d..c536c5ba449 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | ;;; font-lock.el --- Electric font lock mode | 1 | ;;; font-lock.el --- Electric font lock mode |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, | 3 | ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, |
| 4 | ;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. | 4 | ;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 |
| 5 | ;; Free Software Foundation, Inc. | ||
| 5 | 6 | ||
| 6 | ;; Author: jwz, then rms, then sm | 7 | ;; Author: jwz, then rms, then sm |
| 7 | ;; Maintainer: FSF | 8 | ;; Maintainer: FSF |
| @@ -2147,7 +2148,7 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item." | |||
| 2147 | ;; `cpp-font-lock-keywords' is handy for modes for the files. | 2148 | ;; `cpp-font-lock-keywords' is handy for modes for the files. |
| 2148 | ;; | 2149 | ;; |
| 2149 | ;; Here we cannot use `regexp-opt' because because regex-opt is not preloaded | 2150 | ;; Here we cannot use `regexp-opt' because because regex-opt is not preloaded |
| 2150 | ;; while font-lock.el is preloaded to emacs. So values pre-calculated with | 2151 | ;; while font-lock.el is preloaded to emacs. So values pre-calculated with |
| 2151 | ;; regexp-opt are used here. | 2152 | ;; regexp-opt are used here. |
| 2152 | 2153 | ||
| 2153 | ;; `cpp-font-lock-keywords-source-directives' is calculated from: | 2154 | ;; `cpp-font-lock-keywords-source-directives' is calculated from: |
| @@ -2183,16 +2184,16 @@ Used in `cpp-font-lock-keywords'.") | |||
| 2183 | 1 font-lock-string-face prepend) | 2184 | 1 font-lock-string-face prepend) |
| 2184 | ;; | 2185 | ;; |
| 2185 | ;; Fontify function macro names. | 2186 | ;; Fontify function macro names. |
| 2186 | '("^#[ \t]*define[ \t]+\\([[:alpha:]_][[:alnum:]_$]*\\)(" | 2187 | '("^#[ \t]*define[ \t]+\\([[:alpha:]_][[:alnum:]_$]*\\)(" |
| 2187 | (1 font-lock-function-name-face prepend) | 2188 | (1 font-lock-function-name-face prepend) |
| 2188 | ;; | 2189 | ;; |
| 2189 | ;; Macro arguments. | 2190 | ;; Macro arguments. |
| 2190 | ((lambda (limit) | 2191 | ((lambda (limit) |
| 2191 | (re-search-forward | 2192 | (re-search-forward |
| 2192 | "\\(?:\\([[:alpha:]_][[:alnum:]_]*\\)[,]?\\)" | 2193 | "\\(?:\\([[:alpha:]_][[:alnum:]_]*\\)[,]?\\)" |
| 2193 | (or (save-excursion (re-search-forward ")" limit t)) | 2194 | (or (save-excursion (re-search-forward ")" limit t)) |
| 2194 | limit) | 2195 | limit) |
| 2195 | t)) | 2196 | t)) |
| 2196 | nil nil (1 font-lock-variable-name-face prepend))) | 2197 | nil nil (1 font-lock-variable-name-face prepend))) |
| 2197 | ;; | 2198 | ;; |
| 2198 | ;; Fontify symbol names in #elif or #if ... defined preprocessor directives. | 2199 | ;; Fontify symbol names in #elif or #if ... defined preprocessor directives. |
| @@ -2240,8 +2241,9 @@ other modes in which C preprocessor directives are used. e.g. `asm-mode' and | |||
| 2240 | ((match-beginning 6) font-lock-variable-name-face) | 2241 | ((match-beginning 6) font-lock-variable-name-face) |
| 2241 | (t font-lock-type-face)) | 2242 | (t font-lock-type-face)) |
| 2242 | nil t)) | 2243 | nil t)) |
| 2243 | ;; Emacs Lisp autoload cookies. | 2244 | ;; Emacs Lisp autoload cookies. Supports the slightly different |
| 2244 | ("^;;;###\\(autoload\\)" 1 font-lock-warning-face prepend) | 2245 | ;; forms used by mh-e, calendar, etc. |
| 2246 | ("^;;;###\\([-a-z]*autoload\\)" 1 font-lock-warning-face prepend) | ||
| 2245 | ;; Regexp negated char group. | 2247 | ;; Regexp negated char group. |
| 2246 | ("\\[\\(\\^\\)" 1 font-lock-negation-char-face prepend))) | 2248 | ("\\[\\(\\^\\)" 1 font-lock-negation-char-face prepend))) |
| 2247 | "Subdued level highlighting for Lisp modes.") | 2249 | "Subdued level highlighting for Lisp modes.") |