aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-10-07 10:00:00 +0000
committerRichard M. Stallman1994-10-07 10:00:00 +0000
commit8b1f1a0c15f404c4f46edc7f2cd722457cd50af3 (patch)
treed2581bd2a1ee5cda4e4470b3602af36f3558fe93
parenta95caeed5263f1bfe93d7ca7268d48612058e2c1 (diff)
downloademacs-8b1f1a0c15f404c4f46edc7f2cd722457cd50af3.tar.gz
emacs-8b1f1a0c15f404c4f46edc7f2cd722457cd50af3.zip
(mail-font-lock-keywords): New variable.
(mail-mode): Set font-lock-keywords locally.
-rw-r--r--lisp/mail/sendmail.el15
1 files changed, 14 insertions, 1 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index fcaed8fa381..982ed8ecbbd 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -159,11 +159,22 @@ actually occur.")
159(defvar mail-mode-syntax-table nil 159(defvar mail-mode-syntax-table nil
160 "Syntax table used while in mail mode.") 160 "Syntax table used while in mail mode.")
161 161
162(if (null mail-mode-syntax-table) 162(if (not mail-mode-syntax-table)
163 (progn 163 (progn
164 (setq mail-mode-syntax-table (copy-syntax-table text-mode-syntax-table)) 164 (setq mail-mode-syntax-table (copy-syntax-table text-mode-syntax-table))
165 (modify-syntax-entry ?% ". " mail-mode-syntax-table))) 165 (modify-syntax-entry ?% ". " mail-mode-syntax-table)))
166 166
167(defvar mail-font-lock-keywords
168 (list '("^To:" . font-lock-function-name-face)
169 '("^B?CC:\\|^Reply-To:" . font-lock-keyword-face)
170 '("^Subject:" . font-lock-comment-face)
171 '("^Subject:\\s *\\(.+\\)$" 1 font-lock-type-face)
172 (list (concat "^\\(" mail-header-separator "\\)$") 1
173 'font-lock-comment-face)
174 '("^[ \t]*\\sw*[>|}].*$" . font-lock-reference-face) ; Citation.
175 '("^\\(X-[A-Za-z0-9-]+\\|In-reply-to\\):.*$" . font-lock-string-face))
176 "Additional expressions to highlight in Mail mode.")
177
167(defvar mail-send-hook nil 178(defvar mail-send-hook nil
168 "Normal hook run before sending mail, in Mail mode.") 179 "Normal hook run before sending mail, in Mail mode.")
169 180
@@ -253,6 +264,8 @@ C-c C-v mail-sent-via (add a sent-via field for each To or CC)."
253 (setq major-mode 'mail-mode) 264 (setq major-mode 'mail-mode)
254 (setq mode-name "Mail") 265 (setq mode-name "Mail")
255 (setq buffer-offer-save t) 266 (setq buffer-offer-save t)
267 (make-local-variable 'font-lock-keywords)
268 (setq font-lock-keywords mail-font-lock-keywords)
256 (make-local-variable 'paragraph-separate) 269 (make-local-variable 'paragraph-separate)
257 (make-local-variable 'paragraph-start) 270 (make-local-variable 'paragraph-start)
258 (setq paragraph-start (concat "^" mail-header-separator 271 (setq paragraph-start (concat "^" mail-header-separator