changeset 21284:1d971e4f4645

check length of mail-header-separator before using in font-lock-keywords.
author Simon Marshall <simon@gnu.org>
date Wed, 25 Mar 1998 16:41:18 +0000
parents c431691cbff1
children a3d90bdad8f9
files lisp/mail/sendmail.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/sendmail.el	Wed Mar 25 10:45:59 1998 +0000
+++ b/lisp/mail/sendmail.el	Wed Mar 25 16:41:18 1998 +0000
@@ -271,8 +271,10 @@
 	      (1 font-lock-comment-face) (2 font-lock-type-face nil t))
 	    ;; Use EVAL to delay in case `mail-header-separator' gets changed.
 	    '(eval .
-	      (cons (concat "^" (regexp-quote mail-header-separator) "$")
-		    'font-lock-warning-face))
+	      (let ((separator (if (zerop (length mail-header-separator))
+				   " "
+				 (regexp-quote mail-header-separator))))
+		(cons (concat "^" separator "$") 'font-lock-warning-face)))
 	    ;; Use MATCH-ANCHORED to effectively anchor the regexp left side.
 	    `(,cite-chars
 	      (,(concat "\\=[ \t]*"