1825 |
"Font Lock mode face used to highlight preprocessor directives." |
"Font Lock mode face used to highlight preprocessor directives." |
1826 |
:group 'font-lock-highlighting-faces) |
:group 'font-lock-highlighting-faces) |
1827 |
|
|
1828 |
(defface font-lock-regexp-backslash |
(defface font-lock-regexp-grouping-backslash |
1829 |
'((((class color) (min-colors 16)) :inherit escape-glyph) |
'((((class color) (min-colors 16)) :inherit escape-glyph) |
1830 |
(t :inherit bold)) |
(t :inherit bold)) |
1831 |
"Font Lock mode face used to highlight a backslash in Lisp regexps." |
"Font Lock mode face for backslashes in Lisp regexp grouping constructs." |
1832 |
:group 'font-lock-highlighting-faces) |
:group 'font-lock-highlighting-faces) |
1833 |
|
|
1834 |
(defface font-lock-regexp-backslash-construct |
(defface font-lock-regexp-backslash-grouping-construct |
1835 |
'((t :inherit bold)) |
'((t :inherit bold)) |
1836 |
"Font Lock mode face used to highlight `\' constructs in Lisp regexps." |
"Font Lock mode face used to highlight grouping constructs in Lisp regexps." |
1837 |
:group 'font-lock-highlighting-faces) |
:group 'font-lock-highlighting-faces) |
1838 |
|
|
1839 |
;;; End of Colour etc. support. |
;;; End of Colour etc. support. |
2082 |
("\\<:\\sw+\\>" 0 font-lock-builtin-face) |
("\\<:\\sw+\\>" 0 font-lock-builtin-face) |
2083 |
;; ELisp and CLisp `&' keywords as types. |
;; ELisp and CLisp `&' keywords as types. |
2084 |
("\\&\\sw+\\>" . font-lock-type-face) |
("\\&\\sw+\\>" . font-lock-type-face) |
2085 |
;; Make regexp grouping constructs bold, so they stand out, but only |
;; ELisp regexp grouping constructs |
|
;; in strings. |
|
2086 |
((lambda (bound) |
((lambda (bound) |
2087 |
(if (re-search-forward "\\(\\\\\\\\\\)\\((\\(?:?:\\)?\\|[|)]\\)" bound t) |
(catch 'found |
2088 |
(let ((face (get-text-property (1- (point)) 'face))) |
;; The following loop is needed to continue searching after matches |
2089 |
(if (listp face) |
;; that do not occur in strings. The associated regexp matches one |
2090 |
(memq 'font-lock-string-face face) |
;; of `\\\\' `\\(' `\\(?:' `\\|' `\\)'. `\\\\' has been included to |
2091 |
(eq 'font-lock-string-face face))))) |
;; avoid highlighting, for example, `\\(' in `\\\\('. |
2092 |
(1 'font-lock-regexp-backslash prepend) |
(while (re-search-forward "\\(\\\\\\\\\\)\\(?:\\(\\\\\\\\\\)\\|\\((\\(?:\\?:\\)?\\|[|)]\\)\\)" bound t) |
2093 |
(2 'font-lock-regexp-backslash-construct prepend)) |
(unless (match-beginning 2) |
2094 |
|
(let ((face (get-text-property (1- (point)) 'face))) |
2095 |
;; Underline innermost grouping, so that you can more easily see what |
(when (or (and (listp face) |
2096 |
;; belongs together. 2005-05-12: Font-lock can go into an |
(memq 'font-lock-string-face face)) |
2097 |
;; unbreakable endless loop on this -- something's broken. |
(eq 'font-lock-string-face face)) |
2098 |
;;("[\\][\\][(]\\(?:\\?:\\)?\\(\\(?:[^\\\"]+\\|[\\]\\(?:[^\\]\\|[\\][^(]\\)\\)+?\\)[\\][\\][)]" |
(throw 'found t))))))) |
2099 |
;;1 'underline prepend) |
(1 'font-lock-regexp-grouping-backslash prepend) |
2100 |
|
(3 'font-lock-regexp-grouping-construct prepend)) |
2101 |
;;; This is too general -- rms. |
;;; This is too general -- rms. |
2102 |
;;; A user complained that he has functions whose names start with `do' |
;;; A user complained that he has functions whose names start with `do' |
2103 |
;;; and that they get the wrong color. |
;;; and that they get the wrong color. |