1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00

Fixes to echo area messages when creating Log Edit mode buffers

* lisp/vc/log-edit.el (log-edit): Don't emit a message when
MODE.
* lisp/vc/vc-dispatcher.el (vc-start-logentry): Use '\\<>' to
simplify the code slightly.
This commit is contained in:
Sean Whitton 2025-11-06 14:34:24 +00:00
parent 3035e44b9a
commit bd4ac3b23b
2 changed files with 7 additions and 5 deletions

View file

@ -560,8 +560,12 @@ done. Otherwise, this function will use the current buffer."
(erase-buffer)
(run-hooks 'log-edit-hook))
(push-mark (point-max))
(message "%s" (substitute-command-keys
"Press \\[log-edit-done] when you are done editing."))))
;; `vc-start-logentry' already emits a message; avoid a duplicate,
;; and ensure we don't emit one at all in the case of doing the
;; action immediately.
(unless mode
(message "%s" (substitute-command-keys
"Press \\[log-edit-done] when you are done editing.")))))
(define-derived-mode log-edit-mode text-mode "Log-Edit"
"Major mode for editing version-control (VC) commit log messages.

View file

@ -871,9 +871,7 @@ DIFF-FUNCTION is `log-edit-diff-function' for the Log Edit buffer."
(when (stringp comment) (insert comment)))
(if (or (not comment) initial-contents)
(message (substitute-command-keys
(if (eq major-mode 'log-edit-mode)
"%s Type \\[log-edit-done] when done"
"%s Type \\`C-c C-c' when done"))
"%s Type \\<log-edit-mode-map>\\[log-edit-done] when done")
msg)
(vc-finish-logentry (eq comment t)))))