comparison lisp/mail/sendmail.el @ 16453:90a2c2aebc37

Tweak mail-font-lock-keywords.
author Simon Marshall <simon@gnu.org>
date Wed, 23 Oct 1996 09:26:35 +0000
parents 37baba8d7fbc
children a076177cfac7
comparison
equal deleted inserted replaced
16452:c51321427e96 16453:90a2c2aebc37
210 (setq mail-mode-syntax-table (copy-syntax-table text-mode-syntax-table)) 210 (setq mail-mode-syntax-table (copy-syntax-table text-mode-syntax-table))
211 (modify-syntax-entry ?% ". " mail-mode-syntax-table))) 211 (modify-syntax-entry ?% ". " mail-mode-syntax-table)))
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.")
229 235
230 (defvar mail-send-hook nil 236 (defvar mail-send-hook nil