Commit 3d51068d authored by Simon Marshall's avatar Simon Marshall

Tweak font-lock-keywords

parent 45c4fdeb
...@@ -188,14 +188,17 @@ before obeying `rmail-ignored-headers'.") ...@@ -188,14 +188,17 @@ before obeying `rmail-ignored-headers'.")
(list '("^\\(From\\|Sender\\):" . font-lock-function-name-face) (list '("^\\(From\\|Sender\\):" . font-lock-function-name-face)
'("^Reply-To:.*$" . font-lock-function-name-face) '("^Reply-To:.*$" . font-lock-function-name-face)
'("^Subject:" . font-lock-comment-face) '("^Subject:" . font-lock-comment-face)
'("^\\(To\\|Apparently-To\\|Cc\\):" . font-lock-keyword-face) '("^\\(To\\|Apparently-To\\|Cc\\|Newsgroups\\):"
. font-lock-keyword-face)
;; Use MATCH-ANCHORED to effectively anchor the regexp left side. ;; Use MATCH-ANCHORED to effectively anchor the regexp left side.
`(,cite-chars `(,cite-chars
(,(concat "\\=[ \t]*" (,(concat "\\=[ \t]*"
"\\([" cite-prefix "]+[" cite-suffix "]*\\)?" "\\(\\([" cite-prefix "]+[" cite-suffix "]*\\)?"
cite-chars ".*") "\\(" cite-chars "[ \t]*\\)\\)+"
"\\(.*\\)")
(beginning-of-line) (end-of-line) (beginning-of-line) (end-of-line)
(0 font-lock-reference-face))) (2 font-lock-reference-face nil t)
(4 font-lock-comment-face nil t)))
'("^\\(X-[A-Za-z0-9-]+\\|In-reply-to\\|Date\\):.*$" '("^\\(X-[A-Za-z0-9-]+\\|In-reply-to\\|Date\\):.*$"
. font-lock-string-face)))) . font-lock-string-face))))
"Additional expressions to highlight in Rmail mode.") "Additional expressions to highlight in Rmail mode.")
......
...@@ -215,20 +215,23 @@ actually occur.") ...@@ -215,20 +215,23 @@ actually occur.")
(let* ((cite-chars "[>|}]") (let* ((cite-chars "[>|}]")
(cite-prefix "A-Za-z") (cite-prefix "A-Za-z")
(cite-suffix (concat cite-prefix "0-9_.@-`'\""))) (cite-suffix (concat cite-prefix "0-9_.@-`'\"")))
(list '("^To:" . font-lock-function-name-face) (list '("^\\(To\\|Newsgroups\\):" . font-lock-function-name-face)
'("^B?CC:\\|^Reply-to:" . font-lock-keyword-face) '("^\\(B?CC\\|Reply-to\\):" . font-lock-keyword-face)
'("^\\(Subject:\\)[ \t]*\\(.+\\)?" '("^\\(Subject:\\)[ \t]*\\(.+\\)?"
(1 font-lock-comment-face) (2 font-lock-type-face nil t)) (1 font-lock-comment-face) (2 font-lock-type-face nil t))
;; Use EVAL to delay in case `mail-header-separator' gets changed. ;; Use EVAL to delay in case `mail-header-separator' gets changed.
'(eval cons (concat "^" (regexp-quote mail-header-separator) "$") '(eval .
'font-lock-comment-face) (cons (concat "^" (regexp-quote mail-header-separator) "$")
'font-lock-warning-face))
;; Use MATCH-ANCHORED to effectively anchor the regexp left side. ;; Use MATCH-ANCHORED to effectively anchor the regexp left side.
`(,cite-chars `(,cite-chars
(,(concat "\\=[ \t]*" (,(concat "\\=[ \t]*"
"\\([" cite-prefix "]+[" cite-suffix "]*\\)?" "\\(\\([" cite-prefix "]+[" cite-suffix "]*\\)?"
cite-chars ".*") "\\(" cite-chars "[ \t]*\\)\\)+"
"\\(.*\\)")
(beginning-of-line) (end-of-line) (beginning-of-line) (end-of-line)
(0 font-lock-reference-face))) (2 font-lock-reference-face nil t)
(4 font-lock-comment-face nil t)))
'("^\\(X-[A-Za-z0-9-]+\\|In-reply-to\\):.*" '("^\\(X-[A-Za-z0-9-]+\\|In-reply-to\\):.*"
. font-lock-string-face)))) . font-lock-string-face))))
"Additional expressions to highlight in Mail mode.") "Additional expressions to highlight in Mail mode.")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment