From: Stefan Kangas Date: Fri, 16 Sep 2022 14:37:58 +0000 (+0200) Subject: Use substitute-command-keys in some vc messages X-Git-Tag: emacs-29.0.90~1856^2~445 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9b09def4be5b348a984c3e73507206044c22f32b;p=emacs.git 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. --- diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index 36a6f27891b..f64809da616 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el @@ -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 diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 4688137d923..c67dad69fce 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -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