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).
This commit is contained in:
Stefan Kangas 2025-03-07 09:36:38 +01:00
parent 646b3f8c5c
commit c6fe5b7795

View file

@ -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