From: Stefan Kangas Date: Fri, 7 Mar 2025 08:36:38 +0000 (+0100) Subject: Fix using log-edit-mode with git-commit-mode X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5853b769505742fe33ea04e00aaa025aa5357029;p=emacs.git Fix using log-edit-mode with git-commit-mode * lisp/vc/log-edit.el (log-edit-font-lock-keywords): Avoid incorrect fontification when used with the third-party git-commit-mode (part of Magit). (cherry picked from commit c6fe5b779564001e40d5779976968850aa2a166a) --- diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index e23e7414a18..bb85de8bd10 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -457,9 +457,10 @@ The first subexpression is the actual text of the field.") 'log-edit-header) nil lax)) ("^\n" - (progn (goto-char (match-end 0)) (1+ (match-end 0))) nil - (0 '(face log-edit-headers-separator - display-line-numbers-disable t rear-nonsticky t)))) + (and (not (bound-and-true-p git-commit-mode)) + (progn (goto-char (match-end 0)) (1+ (match-end 0)))) nil + (0 '( face log-edit-headers-separator + display-line-numbers-disable t rear-nonsticky t)))) (log-edit--match-first-line (0 'log-edit-summary)))) (defvar log-edit-font-lock-gnu-style nil