changeset 13303:fa3108c53fc3

Change to citation regexp for mail-font-lock-keywords.
author Simon Marshall <simon@gnu.org>
date Thu, 26 Oct 1995 13:48:35 +0000
parents 662aed026c4b
children 3ac6db7496fd
files lisp/mail/sendmail.el
diffstat 1 files changed, 14 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/sendmail.el	Thu Oct 26 13:40:54 1995 +0000
+++ b/lisp/mail/sendmail.el	Thu Oct 26 13:48:35 1995 +0000
@@ -199,14 +199,20 @@
      (modify-syntax-entry ?% ". " mail-mode-syntax-table)))
 
 (defvar mail-font-lock-keywords
-  (list '("^To:" . font-lock-function-name-face)
-	'("^B?CC:\\|^Reply-To:" . font-lock-keyword-face)
-	'("^Subject:" . font-lock-comment-face)
-	'("^Subject:\\s *\\(.+\\)" 1 font-lock-type-face)
-	(list (concat "^\\(" (regexp-quote mail-header-separator) "\\)$") 1
-	      'font-lock-comment-face)
-	'("^[ \t]*\\sw*[>|}].*" . font-lock-reference-face)	; Citation.
-	'("^\\(X-[A-Za-z0-9-]+\\|In-reply-to\\):.*" . font-lock-string-face))
+  (eval-when-compile
+    (let* ((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))
+	    (list (concat "^\\(" (regexp-quote mail-header-separator) "\\)$")
+		  1 'font-lock-comment-face)
+	    (cons (concat "^[ \t]*"
+			  "\\([" cite-prefix "]+[" cite-suffix "]*\\)?"
+			  "[>|}].*")
+		  'font-lock-reference-face)
+	    '("^\\(X-[A-Za-z0-9-]+\\|In-reply-to\\):.*"
+	      . font-lock-string-face))))
   "Additional expressions to highlight in Mail mode.")
 
 (defvar mail-send-hook nil