From: Basil L. Contovounesios Date: Mon, 18 Mar 2019 18:21:15 +0000 (+0000) Subject: Fix mail-header-separator font lock in message.el X-Git-Tag: emacs-27.0.90~2900 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2f7e97ef482ddacd0ed21ccd25ca777beb60ab35;p=emacs.git Fix mail-header-separator font lock in message.el * lisp/gnus/message.el (message-font-lock-keywords): Dynamically font lock mail-header-separator, in case it changes. (bug#34898) --- diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 6da6140c5bc..edfe1a39f3d 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -1601,19 +1601,21 @@ starting with `not' and followed by regexps." (progn (goto-char (match-beginning 0)) (match-end 0)) nil (1 'message-header-name) (2 'message-header-other nil t))) - ,@(if (and mail-header-separator - (not (equal mail-header-separator ""))) - `((,(concat "^\\(" (regexp-quote mail-header-separator) "\\)$") - 1 'message-separator)) - nil) - ((lambda (limit) - (re-search-forward (concat "^\\(" - message-cite-prefix-regexp - "\\).*") - limit t)) - (0 'message-cited-text)) - ("<#/?\\(multipart\\|part\\|external\\|mml\\|secure\\)[^>]*>" - (0 'message-mml)))) + (,(lambda (limit) + (and mail-header-separator + (not (equal mail-header-separator "")) + (re-search-forward + (concat "^" (regexp-quote mail-header-separator) "$") + limit t))) + 0 'message-separator) + (,(lambda (limit) + (re-search-forward (concat "^\\(?:" + message-cite-prefix-regexp + "\\).*") + limit t)) + 0 'message-cited-text) + ("<#/?\\(?:multipart\\|part\\|external\\|mml\\|secure\\)[^>]*>" + 0 'message-mml))) "Additional expressions to highlight in Message mode.") (defvar message-face-alist