]> git.eshelyaron.com Git - emacs.git/commitdiff
check length of mail-header-separator before using in font-lock-keywords.
authorSimon Marshall <simon@gnu.org>
Wed, 25 Mar 1998 16:41:18 +0000 (16:41 +0000)
committerSimon Marshall <simon@gnu.org>
Wed, 25 Mar 1998 16:41:18 +0000 (16:41 +0000)
lisp/mail/sendmail.el

index b8e36ee1517e6430fb22d4a59ef61683b6d6340c..5a01eae58d5563f961697ec1df3f15f09d8a69dc 100644 (file)
@@ -271,8 +271,10 @@ actually occur.")
              (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]*"