aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorStefan Monnier <[email protected]>2005-05-20 13:25:58 +0000
committerStefan Monnier <[email protected]>2005-05-20 13:25:58 +0000
commit9605a00f9c823ff0a5bc0f8412d2e1569ace377b (patch)
tree650658f3545af2f5a7cc254452fa7e1f303c716b /lisp
parent9bc3d124027c320ca799cfb31380b108a84c443c (diff)
(lisp-font-lock-keywords-2): Don't error. Minor regexp-optimization.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/font-lock.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index ba42412d8d..bb24329c00 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -2053,19 +2053,22 @@ This function could be MATCHER in a MATCH-ANCHORED `font-lock-keywords' item."
("\\<:\\sw+\\>" 0 font-lock-builtin-face)
;; ELisp and CLisp `&' keywords as types.
("\\&\\sw+\\>" . font-lock-type-face)
- ;; Make regexp grouping constructs bold, so they stand out, but only in strings.
+ ;; Make regexp grouping constructs bold, so they stand out, but only
+ ;; in strings.
((lambda (bound)
- (if (re-search-forward "\\([\\][\\]\\)\\([(|)]\\)\\(\\?:\\)?" bound)
+ (if (re-search-forward "\\(\\\\\\\\\\)\\([(|)]\\)\\(\\?:\\)?" bound t)
(let ((face (get-text-property (1- (point)) 'face)))
(if (listp face)
(memq 'font-lock-string-face face)
(eq 'font-lock-string-face face)))))
- (1 font-lock-comment-face prepend) ; Should we introduce a lowlight face for this?
- ; Ideally that would retain the color, dimmed 50%.
+ ;; Should we introduce a lowlight face for this?
+ ;; Ideally that would retain the color, dimmed.
+ (1 font-lock-comment-face prepend)
(2 'bold prepend)
(3 font-lock-type-face prepend t))
- ;; Underline innermost grouping, so that you can more easily see what belongs together.
- ;; 2005-05-12: Font-lock can go into an unbreakable endless loop on this -- something's broken.
+ ;; Underline innermost grouping, so that you can more easily see what
+ ;; belongs together. 2005-05-12: Font-lock can go into an
+ ;; unbreakable endless loop on this -- something's broken.
;;("[\\][\\][(]\\(?:\\?:\\)?\\(\\(?:[^\\\"]+\\|[\\]\\(?:[^\\]\\|[\\][^(]\\)\\)+?\\)[\\][\\][)]"
;;1 'underline prepend)
;;; This is too general -- rms.