emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 9b09def4be 1/2: Use substitute-command-keys in some vc messages


From: Stefan Kangas
Subject: master 9b09def4be 1/2: Use substitute-command-keys in some vc messages
Date: Fri, 16 Sep 2022 11:09:40 -0400 (EDT)

branch: master
commit 9b09def4be5b348a984c3e73507206044c22f32b
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>

    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.
---
 lisp/vc/vc-dispatcher.el | 6 +++++-
 lisp/vc/vc.el            | 4 +++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el
index 36a6f27891..f64809da61 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 4688137d92..c67dad69fc 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]