]> git.eshelyaron.com Git - emacs.git/commitdiff
(log-view-font-lock-keywords): Use `eval' to consult the
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 20 Jun 2007 18:18:31 +0000 (18:18 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 20 Jun 2007 18:18:31 +0000 (18:18 +0000)
buffer-local value of log-view-*-re if applicable.

lisp/log-view.el

index bf029045a8c19950983c5d6aecd3fd3da24bb4a0..5962c216624484aa3f37c2fd514c9eda4b5cd8cf 100644 (file)
 (put 'log-view-message-face 'face-alias 'log-view-message)
 (defvar log-view-message-face 'log-view-message)
 
-(defconst log-view-file-re
+(defvar log-view-file-re
   (concat "^\\(?:Working file: \\(?1:.+\\)"                ;RCS and CVS.
           ;; Subversion has no such thing??
           "\\|\\(?:SCCS/s\\.\\|Changes to \\)\\(?1:.+\\):" ;SCCS and Darcs.
          "\\)\n"))                   ;Include the \n for font-lock reasons.
 
-(defconst log-view-message-re
+(defvar log-view-message-re
   (concat "^\\(?:revision \\(?1:[.0-9]+\\)\\(?:\t.*\\)?" ; RCS and CVS.
           "\\|r\\(?1:[0-9]+\\) | .* | .*"                ; Subversion.
           "\\|D \\(?1:[.0-9]+\\) .*"                     ; SCCS.
                   "  .*@.*\n\\(?:  \\* \\(?1:.*\\)\\)?")
           "\\)$"))
 
-(defconst log-view-font-lock-keywords
-  `((,log-view-file-re
-     (1 (if (boundp 'cvs-filename-face) cvs-filename-face))
-     (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))
+              (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))