]> git.eshelyaron.com Git - emacs.git/commitdiff
(outline-font-lock-keywords): Highlight the
authorKarl Heuer <kwzh@gnu.org>
Fri, 24 Oct 1997 19:37:53 +0000 (19:37 +0000)
committerKarl Heuer <kwzh@gnu.org>
Fri, 24 Oct 1997 19:37:53 +0000 (19:37 +0000)
whole line, not just the part that matches the regexp.

lisp/textmodes/outline.el

index b15f3b9b75f11e9dea36ddfb80f0e92f096f1b7f..80c65a5301b77c7bd2e2336c4ad814fcdb6b2c1e 100644 (file)
@@ -147,17 +147,20 @@ in the file it applies to."
                                   (list '(outline-minor-mode " Outl")))))
 
 (defvar outline-font-lock-keywords
-  '(;; Highlight headings according to the level.
-    ("^\\(\\*+\\)[ \t]*\\(.+\\)?[ \t]*$"
-     (1 font-lock-string-face)
-     (2 (let ((len (- (match-end 1) (match-beginning 1))))
-         (or (cdr (assq len '((1 . font-lock-function-name-face)
-                              (2 . font-lock-keyword-face)
-                              (3 . font-lock-comment-face))))
-             font-lock-variable-name-face))
-       nil t))
-    ;; Highlight citations of the form [1] and [Mar94].
-    ("\\[\\([A-Z][A-Za-z]+\\)*[0-9]+\\]" . font-lock-type-face))
+  '(;;
+    ;; Highlight headings according to the level.
+    (eval . (list (concat "^" outline-regexp ".+")
+                 0 '(or (cdr (assq (outline-font-lock-level)
+                                   '((1 . font-lock-function-name-face)
+                                     (2 . font-lock-variable-name-face)
+                                     (3 . font-lock-keyword-face)
+                                     (4 . font-lock-builtin-face)
+                                     (5 . font-lock-comment-face)
+                                     (6 . font-lock-reference-face)
+                                     (7 . font-lock-type-face)
+                                     (8 . font-lock-string-face))))
+                        font-lock-warning-face)
+                 nil t)))
   "Additional expressions to highlight in Outline mode.")
 
 (defvar outline-view-change-hook nil