aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/mail/sendmail.el16
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 42d52af460e..faed238e239 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -212,17 +212,23 @@ actually occur.")
212 212
213(defvar mail-font-lock-keywords 213(defvar mail-font-lock-keywords
214 (eval-when-compile 214 (eval-when-compile
215 (let* ((cite-prefix "A-Za-z") (cite-suffix (concat cite-prefix "0-9_.@-"))) 215 (let* ((cite-chars "[>|}]")
216 (cite-prefix "A-Za-z")
217 (cite-suffix (concat cite-prefix "0-9_.@-`'\"")))
216 (list '("^To:" . font-lock-function-name-face) 218 (list '("^To:" . font-lock-function-name-face)
217 '("^B?CC:\\|^Reply-to:" . font-lock-keyword-face) 219 '("^B?CC:\\|^Reply-to:" . font-lock-keyword-face)
218 '("^\\(Subject:\\)[ \t]*\\(.+\\)?" 220 '("^\\(Subject:\\)[ \t]*\\(.+\\)?"
219 (1 font-lock-comment-face) (2 font-lock-type-face nil t)) 221 (1 font-lock-comment-face) (2 font-lock-type-face nil t))
222 ;; Use EVAL to delay in case `mail-header-separator' gets changed.
220 '(eval cons (concat "^" (regexp-quote mail-header-separator) "$") 223 '(eval cons (concat "^" (regexp-quote mail-header-separator) "$")
221 'font-lock-comment-face) 224 'font-lock-comment-face)
222 (cons (concat "^[ \t]*" 225 ;; Use MATCH-ANCHORED to effectively anchor the regexp left side.
223 "\\([" cite-prefix "]+[" cite-suffix "]*\\)?" 226 `(,cite-chars
224 "[>|}].*") 227 (,(concat "\\=[ \t]*"
225 'font-lock-reference-face) 228 "\\([" cite-prefix "]+[" cite-suffix "]*\\)?"
229 cite-chars ".*")
230 (beginning-of-line) (end-of-line)
231 (0 font-lock-reference-face)))
226 '("^\\(X-[A-Za-z0-9-]+\\|In-reply-to\\):.*" 232 '("^\\(X-[A-Za-z0-9-]+\\|In-reply-to\\):.*"
227 . font-lock-string-face)))) 233 . font-lock-string-face))))
228 "Additional expressions to highlight in Mail mode.") 234 "Additional expressions to highlight in Mail mode.")