aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/textmodes/outline.el25
1 files changed, 14 insertions, 11 deletions
diff --git a/lisp/textmodes/outline.el b/lisp/textmodes/outline.el
index b15f3b9b75f..80c65a5301b 100644
--- a/lisp/textmodes/outline.el
+++ b/lisp/textmodes/outline.el
@@ -147,17 +147,20 @@ in the file it applies to."
147 (list '(outline-minor-mode " Outl"))))) 147 (list '(outline-minor-mode " Outl")))))
148 148
149(defvar outline-font-lock-keywords 149(defvar outline-font-lock-keywords
150 '(;; Highlight headings according to the level. 150 '(;;
151 ("^\\(\\*+\\)[ \t]*\\(.+\\)?[ \t]*$" 151 ;; Highlight headings according to the level.
152 (1 font-lock-string-face) 152 (eval . (list (concat "^" outline-regexp ".+")
153 (2 (let ((len (- (match-end 1) (match-beginning 1)))) 153 0 '(or (cdr (assq (outline-font-lock-level)
154 (or (cdr (assq len '((1 . font-lock-function-name-face) 154 '((1 . font-lock-function-name-face)
155 (2 . font-lock-keyword-face) 155 (2 . font-lock-variable-name-face)
156 (3 . font-lock-comment-face)))) 156 (3 . font-lock-keyword-face)
157 font-lock-variable-name-face)) 157 (4 . font-lock-builtin-face)
158 nil t)) 158 (5 . font-lock-comment-face)
159 ;; Highlight citations of the form [1] and [Mar94]. 159 (6 . font-lock-reference-face)
160 ("\\[\\([A-Z][A-Za-z]+\\)*[0-9]+\\]" . font-lock-type-face)) 160 (7 . font-lock-type-face)
161 (8 . font-lock-string-face))))
162 font-lock-warning-face)
163 nil t)))
161 "Additional expressions to highlight in Outline mode.") 164 "Additional expressions to highlight in Outline mode.")
162 165
163(defvar outline-view-change-hook nil 166(defvar outline-view-change-hook nil