diff options
| author | Daniel Pfeiffer | 2005-05-19 02:15:09 +0000 |
|---|---|---|
| committer | Daniel Pfeiffer | 2005-05-19 02:15:09 +0000 |
| commit | ae0c69273e4d8887db9bb5e7de0d5c6f6ce48d4c (patch) | |
| tree | 8ed4106398b8141598cac151870b44f903424549 | |
| parent | caccc8de140d4e47090c06bc69e0abfa5ddc24a1 (diff) | |
| download | emacs-ae0c69273e4d8887db9bb5e7de0d5c6f6ce48d4c.tar.gz emacs-ae0c69273e4d8887db9bb5e7de0d5c6f6ce48d4c.zip | |
(lisp-font-lock-keywords-2): Do \\) only in strings, because (eq ... ?\\) is fairly frequent.
| -rw-r--r-- | lisp/font-lock.el | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index ee1fc1a515e..ba42412d8da 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el | |||
| @@ -2053,9 +2053,15 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item." | |||
| 2053 | ("\\<:\\sw+\\>" 0 font-lock-builtin-face) | 2053 | ("\\<:\\sw+\\>" 0 font-lock-builtin-face) |
| 2054 | ;; ELisp and CLisp `&' keywords as types. | 2054 | ;; ELisp and CLisp `&' keywords as types. |
| 2055 | ("\\&\\sw+\\>" . font-lock-type-face) | 2055 | ("\\&\\sw+\\>" . font-lock-type-face) |
| 2056 | ;; Make regexp grouping constructs bold, so they stand out. | 2056 | ;; Make regexp grouping constructs bold, so they stand out, but only in strings. |
| 2057 | ("\\([\\][\\]\\)\\([(|)]\\)\\(\\?:\\)?" | 2057 | ((lambda (bound) |
| 2058 | (1 font-lock-comment-face prepend) | 2058 | (if (re-search-forward "\\([\\][\\]\\)\\([(|)]\\)\\(\\?:\\)?" bound) |
| 2059 | (let ((face (get-text-property (1- (point)) 'face))) | ||
| 2060 | (if (listp face) | ||
| 2061 | (memq 'font-lock-string-face face) | ||
| 2062 | (eq 'font-lock-string-face face))))) | ||
| 2063 | (1 font-lock-comment-face prepend) ; Should we introduce a lowlight face for this? | ||
| 2064 | ; Ideally that would retain the color, dimmed 50%. | ||
| 2059 | (2 'bold prepend) | 2065 | (2 'bold prepend) |
| 2060 | (3 font-lock-type-face prepend t)) | 2066 | (3 font-lock-type-face prepend t)) |
| 2061 | ;; Underline innermost grouping, so that you can more easily see what belongs together. | 2067 | ;; Underline innermost grouping, so that you can more easily see what belongs together. |