summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorSimon Marshall <simon@gnu.org>1996-10-23 09:26:35 +0000
committerSimon Marshall <simon@gnu.org>1996-10-23 09:26:35 +0000
commitb5dd8ec3a2388471f2599c0d5b40a73550342827 (patch)
tree790d2bd6827b668ef55d1b0a713934e07defe1db /lisp
parente9c4468cf1433e4a1cf531504304e1c391e65718 (diff)
downloademacs-b5dd8ec3a2388471f2599c0d5b40a73550342827.tar.gz
Tweak mail-font-lock-keywords.
Diffstat (limited to 'lisp')
-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.")
(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.")