# HG changeset patch # User Simon Marshall # Date 846062795 0 # Node ID 90a2c2aebc3767fcc55707cbc382d48ff5bfc8c1 # Parent c51321427e969843f3fbe823b1c3b2975bb2bfa8 Tweak mail-font-lock-keywords. diff -r c51321427e96 -r 90a2c2aebc37 lisp/mail/sendmail.el --- a/lisp/mail/sendmail.el Wed Oct 23 09:26:33 1996 +0000 +++ b/lisp/mail/sendmail.el Wed Oct 23 09:26:35 1996 +0000 @@ -212,17 +212,23 @@ (defvar mail-font-lock-keywords (eval-when-compile - (let* ((cite-prefix "A-Za-z") (cite-suffix (concat cite-prefix "0-9_.@-"))) + (let* ((cite-chars "[>|}]") + (cite-prefix "A-Za-z") + (cite-suffix (concat cite-prefix "0-9_.@-`'\""))) (list '("^To:" . font-lock-function-name-face) '("^B?CC:\\|^Reply-to:" . font-lock-keyword-face) '("^\\(Subject:\\)[ \t]*\\(.+\\)?" (1 font-lock-comment-face) (2 font-lock-type-face nil t)) + ;; Use EVAL to delay in case `mail-header-separator' gets changed. '(eval cons (concat "^" (regexp-quote mail-header-separator) "$") 'font-lock-comment-face) - (cons (concat "^[ \t]*" - "\\([" cite-prefix "]+[" cite-suffix "]*\\)?" - "[>|}].*") - 'font-lock-reference-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\\):.*" . font-lock-string-face)))) "Additional expressions to highlight in Mail mode.")