comparison lisp/log-view.el @ 78525:33690fc4e175

(log-view-font-lock-keywords): Use `eval' so as to adapt to buffer settings.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 10 Aug 2007 08:20:20 +0000
parents 9355f9b7bbff
children 82b0e30f9888 e5a68f18fcb9
comparison
equal deleted inserted replaced
78524:30f73a22d4ce 78525:33690fc4e175
158 ;; message. 158 ;; message.
159 ;; First loosely match the date format. 159 ;; First loosely match the date format.
160 (concat "\\|[^ \n].*[^0-9\n][0-9][0-9]:[0-9][0-9][^0-9\n].*[^ \n]" 160 (concat "\\|[^ \n].*[^0-9\n][0-9][0-9]:[0-9][0-9][^0-9\n].*[^ \n]"
161 ;;Email of user and finally Msg, used as revision name. 161 ;;Email of user and finally Msg, used as revision name.
162 " .*@.*\n\\(?: \\* \\(.*\\)\\)?") 162 " .*@.*\n\\(?: \\* \\(.*\\)\\)?")
163 "\\)$")) 163 "\\)$")
164 164 "Regexp matching the text identifying a revision.")
165 (defconst log-view-font-lock-keywords 165
166 `((,log-view-file-re 166 (defvar log-view-font-lock-keywords
167 (1 (if (boundp 'cvs-filename-face) cvs-filename-face) nil t) 167 ;; We use `eval' so as to use the buffer-local value of log-view-file-re
168 (2 (if (boundp 'cvs-filename-face) cvs-filename-face) nil t) 168 ;; and log-view-message-re, if applicable.
169 (0 log-view-file-face append)) 169 '((eval . `(,log-view-file-re
170 (,log-view-message-re . log-view-message-face))) 170 (1 (if (boundp 'cvs-filename-face) cvs-filename-face) nil t)
171 (2 (if (boundp 'cvs-filename-face) cvs-filename-face) nil t)
172 (0 log-view-file-face append)))
173 (eval . `(,log-view-message-re . log-view-message-face))))
174
171 (defconst log-view-font-lock-defaults 175 (defconst log-view-font-lock-defaults
172 '(log-view-font-lock-keywords t nil nil nil)) 176 '(log-view-font-lock-keywords t nil nil nil))
173 177
174 ;;;; 178 ;;;;
175 ;;;; Actual code 179 ;;;; Actual code