Commit e69d810c authored by Simon Marshall's avatar Simon Marshall
Browse files

check length of mail-header-separator before using in font-lock-keywords.

parent 4116deee
......@@ -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]*"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment