Use substitute-command-keys in some vc messages

* lisp/vc/vc-dispatcher.el (vc-start-logentry):
* lisp/vc/vc.el (vc-steal-lock): Use substitute-command-keys.
This commit is contained in:
Stefan Kangas 2022-09-16 16:37:58 +02:00
parent cce9c260b5
commit 9b09def4be
2 changed files with 8 additions and 2 deletions

View file

@ -704,7 +704,11 @@ PATCH-STRING is a patch to check in."
(erase-buffer)
(when (stringp comment) (insert comment)))
(if (or (not comment) initial-contents)
(message "%s Type C-c C-c when done" msg)
(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"))
msg)
(vc-finish-logentry (eq comment t)))))
;; vc-finish-logentry is typically called from a log-edit buffer (see

View file

@ -1627,7 +1627,9 @@ Type \\[vc-next-action] to check in changes.")
(format "I stole the lock on %s, " file-description)
(current-time-string)
".\n")
(message "Please explain why you stole the lock. Type C-c C-c when done.")))
(message
(substitute-command-keys
"Please explain why you stole the lock. Type \\`C-c C-c' when done"))))
(defun vc-checkin (files backend &optional comment initial-contents rev patch-string)
"Check in FILES. COMMENT is a comment string; if omitted, a