comparison lisp/textmodes/outline.el @ 20175:ea977d99058b

(outline-font-lock-keywords): Highlight the whole line, not just the part that matches the regexp.
author Karl Heuer <kwzh@gnu.org>
date Fri, 24 Oct 1997 19:37:53 +0000
parents bf3f4dc09cc0
children f3debcf1d078
comparison
equal deleted inserted replaced
20174:e1ca1fe89e6e 20175:ea977d99058b
145 (or (assq 'outline-minor-mode minor-mode-alist) 145 (or (assq 'outline-minor-mode minor-mode-alist)
146 (setq minor-mode-alist (append minor-mode-alist 146 (setq minor-mode-alist (append minor-mode-alist
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
164 "Normal hook to be run after outline visibility changes.") 167 "Normal hook to be run after outline visibility changes.")
165 168