changeset 9379:138d99e53e94

(rmail-summary-font-lock-keywords): New variable. (rmail-summary-mode): Set font-lock-keywords locally.
author Richard M. Stallman <rms@gnu.org>
date Fri, 07 Oct 1994 09:56:40 +0000
parents 1c9b8b3971a0
children 5eb799a4819b
files lisp/mail/rmailsum.el
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmailsum.el	Fri Oct 07 09:54:58 1994 +0000
+++ b/lisp/mail/rmailsum.el	Fri Oct 07 09:56:40 1994 +0000
@@ -29,6 +29,14 @@
 
 ;;; Code:
 
+(defvar rmail-summary-font-lock-keywords
+  '(("^....D.*$" . font-lock-string-face)			; Deleted.
+    ("^....-.*$" . font-lock-type-face)				; Unread.
+    ;; Neither of the below will be highlighted if either of the above are:
+    ("^....[^D-] \\(......\\)" 1 font-lock-keyword-face)	; Date.
+    ("{ \\([^}]+\\),}" 1 font-lock-comment-face))		; Labels.
+  "Additional expressions to highlight in Rmail Summary mode.")
+
 ;; Entry points for making a summary buffer.
 
 ;; Regenerate the contents of the summary
@@ -547,6 +555,8 @@
   (setq rmail-summary-redo nil)
   (make-local-variable 'revert-buffer-function)
   (make-local-variable 'post-command-hook)
+  (make-local-variable 'font-lock-keywords)
+  (setq font-lock-keywords rmail-summary-font-lock-keywords)
   (rmail-summary-enable)
   (run-hooks 'rmail-summary-mode-hook))