Mercurial > emacs
diff 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 |
line wrap: on
line diff
--- a/lisp/log-view.el Fri Aug 10 08:01:30 2007 +0000 +++ b/lisp/log-view.el Fri Aug 10 08:20:20 2007 +0000 @@ -160,14 +160,18 @@ (concat "\\|[^ \n].*[^0-9\n][0-9][0-9]:[0-9][0-9][^0-9\n].*[^ \n]" ;;Email of user and finally Msg, used as revision name. " .*@.*\n\\(?: \\* \\(.*\\)\\)?") - "\\)$")) + "\\)$") + "Regexp matching the text identifying a revision.") -(defconst log-view-font-lock-keywords - `((,log-view-file-re - (1 (if (boundp 'cvs-filename-face) cvs-filename-face) nil t) - (2 (if (boundp 'cvs-filename-face) cvs-filename-face) nil t) - (0 log-view-file-face append)) - (,log-view-message-re . log-view-message-face))) +(defvar log-view-font-lock-keywords + ;; We use `eval' so as to use the buffer-local value of log-view-file-re + ;; and log-view-message-re, if applicable. + '((eval . `(,log-view-file-re + (1 (if (boundp 'cvs-filename-face) cvs-filename-face) nil t) + (2 (if (boundp 'cvs-filename-face) cvs-filename-face) nil t) + (0 log-view-file-face append))) + (eval . `(,log-view-message-re . log-view-message-face)))) + (defconst log-view-font-lock-defaults '(log-view-font-lock-keywords t nil nil nil))