]> git.eshelyaron.com Git - emacs.git/commitdiff
Tweak rmail-font-lock-keywords.
authorSimon Marshall <simon@gnu.org>
Wed, 23 Oct 1996 09:26:33 +0000 (09:26 +0000)
committerSimon Marshall <simon@gnu.org>
Wed, 23 Oct 1996 09:26:33 +0000 (09:26 +0000)
lisp/mail/rmail.el

index 5cafb8b1c5694cc8d0e8dfc76423f95a2b1ec41d..f38b1a8c615924d405fc2d0f3cb1b3ed971b3107 100644 (file)
@@ -178,18 +178,22 @@ before obeying `rmail-ignored-headers'.")
 
 (defvar rmail-font-lock-keywords
   (eval-when-compile
-    (let* ((cite-prefix "A-Za-z") (cite-suffix (concat cite-prefix "0-9_.@-")))
-      (list
-       '("^\\(From\\|Sender\\):" . font-lock-function-name-face)
-       '("^Reply-To:.*$" . font-lock-function-name-face)
-       '("^Subject:" . font-lock-comment-face)
-       '("^\\(To\\|Apparently-To\\|Cc\\):" . font-lock-keyword-face)
-       (cons (concat "^[ \t]*"
-                    "\\([" cite-prefix "]+[" cite-suffix "]*\\)?"
-                    "[>|}].*")
-            'font-lock-reference-face)
-       '("^\\(X-[A-Za-z0-9-]+\\|In-reply-to\\|Date\\):.*$"
-        . font-lock-string-face))))
+    (let* ((cite-chars "[>|}]")
+          (cite-prefix "A-Za-z")
+          (cite-suffix (concat cite-prefix "0-9_.@-`'\"")))
+      (list '("^\\(From\\|Sender\\):" . font-lock-function-name-face)
+           '("^Reply-To:.*$" . font-lock-function-name-face)
+           '("^Subject:" . font-lock-comment-face)
+           '("^\\(To\\|Apparently-To\\|Cc\\):" . font-lock-keyword-face)
+           ;; Use MATCH-ANCHORED to effectively anchor the regexp left side.
+           `(,cite-chars
+             (,(concat "\\=[ \t]*"
+                       "\\([" cite-prefix "]+[" cite-suffix "]*\\)?"
+                       cite-chars ".*")
+              (beginning-of-line) (end-of-line)
+              (0 font-lock-reference-face)))       
+           '("^\\(X-[A-Za-z0-9-]+\\|In-reply-to\\|Date\\):.*$"
+             . font-lock-string-face))))
   "Additional expressions to highlight in Rmail mode.")
 
 ;; These are used by autoloaded rmail-summary.