[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 0fbe543: Use substitute-command-keys in some messages
From: |
Stefan Kangas |
Subject: |
master 0fbe543: Use substitute-command-keys in some messages |
Date: |
Wed, 17 Nov 2021 08:31:41 -0500 (EST) |
branch: master
commit 0fbe543bc1a7cc3e9198eb0d8fc4b248ff0701e6
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
Use substitute-command-keys in some messages
* lisp/dired.el (dired-get-file-for-visit):
* lisp/doc-view.el (doc-view-buffer-message):
* lisp/help.el (help-window-setup):
* lisp/ibuf-ext.el (ibuffer-do-kill-lines):
* lisp/vc/ediff.el (ediff-documentation): Use 'substitute-command-keys'.
---
lisp/dired.el | 4 +++-
lisp/doc-view.el | 10 +++++-----
lisp/help.el | 12 ++++++------
lisp/ibuf-ext.el | 5 ++++-
lisp/vc/ediff.el | 4 +++-
5 files changed, 21 insertions(+), 14 deletions(-)
diff --git a/lisp/dired.el b/lisp/dired.el
index 8650fb9..a0fa917 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -2449,7 +2449,9 @@ directory in another window."
file-name
(if (file-symlink-p file-name)
(error "File is a symlink to a nonexistent target")
- (error "File no longer exists; type `g' to update Dired buffer")))))
+ (error (substitute-command-keys
+ (concat "File no longer exists; type \\<dired-mode-map>"
+ "\\[revert-buffer] to update Dired buffer")))))))
;; Force C-m keybinding rather than `f' or `e' in the mode doc:
(define-obsolete-function-alias 'dired-advertised-find-file
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 088ca5b..32e2ec1 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -1530,16 +1530,16 @@ have the page we want to view."
(overlay-put (doc-view-current-overlay) 'display
(concat (propertize "Welcome to DocView!" 'face 'bold)
"\n"
- "
+ (substitute-command-keys "
If you see this buffer it means that the document you want to view is being
converted to PNG and the conversion of the first page hasn't finished yet or
`doc-view-conversion-refresh-interval' is set to nil.
For now these keys are useful:
-
-`q' : Bury this buffer. Conversion will go on in background.
-`k' : Kill the conversion process and this buffer.
-`K' : Kill the conversion process.\n"))))
+\\<doc-view-mode-map>
+\\[quit-window] : Bury this buffer. Conversion will go on in background.
+\\[image-kill-buffer] : Kill the conversion process and this buffer.
+\\[doc-view-kill-proc] : Kill the conversion process.\n")))))
(declare-function tooltip-show "tooltip" (text &optional use-echo-area))
diff --git a/lisp/help.el b/lisp/help.el
index 4470e6b..68b6d93 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -1833,13 +1833,13 @@ Return VALUE."
(cond
((eq help-setup 'window)
;; ... and is new, ...
- "Type \"q\" to delete help window")
+ "Type \\<help-map>\\[help-quit] to delete help window")
((eq help-setup 'frame)
;; ... on a new frame, ...
- "Type \"q\" to quit the help frame")
+ "Type \\<help-map>\\[help-quit] to quit the help frame")
((eq help-setup 'other)
;; ... or displayed some other buffer before.
- "Type \"q\" to restore previous buffer"))
+ "Type \\<help-map>\\[help-quit] to restore previous buffer"))
window t))
((and (eq (window-frame window) help-window-old-frame)
(= (length (window-list nil 'no-mini)) 2))
@@ -1850,7 +1850,7 @@ Return VALUE."
((eq help-setup 'window)
"Type \\[delete-other-windows] to delete the help window")
((eq help-setup 'other)
- "Type \"q\" in help window to restore its previous buffer"))
+ "Type \\<help-map>\\[help-quit] in help window to restore its
previous buffer"))
window 'other))
(t
;; The help window is not selected ...
@@ -1858,10 +1858,10 @@ Return VALUE."
(cond
((eq help-setup 'window)
;; ... and is new, ...
- "Type \"q\" in help window to delete it")
+ "Type \\<help-map>\\[help-quit] in help window to delete it")
((eq help-setup 'other)
;; ... or displayed some other buffer before.
- "Type \"q\" in help window to restore previous buffer"))
+ "Type \\<help-map>\\[help-quit] in help window to restore previous
buffer"))
window))))
;; Return VALUE.
value))
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index 5b69a87..2d2365d 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -1597,7 +1597,10 @@ to move by. The default is `ibuffer-marked-char'."
"Hide all of the currently marked lines."
(interactive)
(if (= (ibuffer-count-marked-lines) 0)
- (message "No buffers marked; use `m' to mark a buffer")
+ (message (substitute-command-keys
+ (concat
+ "No buffers marked; use \\<ibuffer-mode-map>"
+ "\\[ibuffer-mark-forward] to mark a buffer")))
(let ((count
(ibuffer-map-marked-lines
(lambda (_buf _mark)
diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el
index 97c84ae..cb4c8d9 100644
--- a/lisp/vc/ediff.el
+++ b/lisp/vc/ediff.el
@@ -1558,7 +1558,9 @@ With optional NODE, goes to that node."
(info "ediff")
(if node
(Info-goto-node node)
- (message "Type `i' to search for a specific topic"))
+ (message (substitute-command-keys
+ (concat "Type \\<Info-mode-map>\\[Info-index] to"
+ " search for a specific topic"))))
(raise-frame))
(error (beep 1)
(with-output-to-temp-buffer ediff-msg-buffer
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 0fbe543: Use substitute-command-keys in some messages,
Stefan Kangas <=