From: Stefan Monnier Date: Sat, 12 Dec 2020 15:37:42 +0000 (-0500) Subject: * lisp/vc/log-edit.el: Keep separator line thin even with line-numbers X-Git-Tag: emacs-28.0.90~4749 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a12fe07a8849da0fb68b7233cef839a6a60a6241;p=emacs.git * lisp/vc/log-edit.el: Keep separator line thin even with line-numbers (log-edit-font-lock-keywords): Disable line-number display on the thin separator line. (log-edit-mode): Adjust `font-lock-extra-managed-props` accordingly. (log-edit-changelog-entries): Don't use a nil buffer-local `change-log-default-name`. --- diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index feafe5f5f0a..5f978daec02 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -387,7 +387,8 @@ The first subexpression is the actual text of the field.") nil lax)) ("^\n" (progn (goto-char (match-end 0)) (1+ (match-end 0))) nil - (0 '(:height 0.1 :inverse-video t :extend t)))) + (0 '(face (:height 0.1 :inverse-video t :extend t) + 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 @@ -490,6 +491,9 @@ commands (under C-x v for VC, for example). \\{log-edit-mode-map}" (setq-local font-lock-defaults '(log-edit-font-lock-keywords t)) + (make-local-variable 'font-lock-extra-managed-props) + (cl-pushnew 'rear-nonsticky font-lock-extra-managed-props) + (cl-pushnew 'display-line-numbers-disable font-lock-extra-managed-props) (setq-local jit-lock-contextually t) ;For the "first line is summary". (setq-local fill-paragraph-function #'log-edit-fill-entry) (make-local-variable 'log-edit-comment-ring-index) @@ -983,16 +987,17 @@ where LOGBUFFER is the name of the ChangeLog buffer, and each (visiting-buffer (find-buffer-visiting file))) ;; If there is a buffer visiting FILE, and it has a local ;; value for `change-log-default-name', use that. - (if (and visiting-buffer + (or (and visiting-buffer (local-variable-p 'change-log-default-name - visiting-buffer)) - (with-current-buffer visiting-buffer - change-log-default-name) - ;; `find-change-log' uses `change-log-default-name' if set - ;; and sets it before exiting, so we need to work around - ;; that memoizing which is undesired here. - (setq change-log-default-name nil) - (find-change-log))))) + visiting-buffer) + (with-current-buffer visiting-buffer + change-log-default-name)) + ;; `find-change-log' uses `change-log-default-name' if set + ;; and sets it before exiting, so we need to work around + ;; that memoizing which is undesired here. + (progn + (setq change-log-default-name nil) + (find-change-log)))))) (when (or (find-buffer-visiting changelog-file-name) (file-exists-p changelog-file-name) add-log-dont-create-changelog-file)