/[emacs]/emacs/lisp/font-lock.el
ViewVC logotype

Diff of /emacs/lisp/font-lock.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.265 by monnier, Wed Jun 29 08:19:17 2005 UTC revision 1.266 by eliz, Sat Jul 2 09:40:42 2005 UTC
# Line 1825  Sets various variables using `font-lock- Line 1825  Sets various variables using `font-lock-
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.
# Line 2082  This function could be MATCHER in a MATC Line 2082  This function could be MATCHER in a MATC
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.

Legend:
Removed from v.1.265  
changed lines
  Added in v.1.266

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26