[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 67a15ce156: Use substitute-command-keys in a few more places
From: |
Stefan Kangas |
Subject: |
master 67a15ce156: Use substitute-command-keys in a few more places |
Date: |
Tue, 23 Aug 2022 15:09:12 -0400 (EDT) |
branch: master
commit 67a15ce1564ce35ece24a19f00e03a36e0575746
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefankangas@gmail.com>
Use substitute-command-keys in a few more places
* lisp/indent.el (edit-tab-stops):
* lisp/printing.el (pr-help-message, pr-show-setup):
* lisp/progmodes/cperl-mode.el (cperl-narrow-to-here-doc): Use
substitute-command-keys.
---
lisp/calc/calc-prog.el | 3 ++-
lisp/indent.el | 4 +++-
lisp/printing.el | 12 +++++++-----
lisp/progmodes/cperl-mode.el | 4 ++--
4 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el
index f11d9741ec..127f6340a1 100644
--- a/lisp/calc/calc-prog.el
+++ b/lisp/calc/calc-prog.el
@@ -1447,7 +1447,8 @@ Redefine the corresponding command."
(let ((calc-kbd-push-level 0))
(execute-kbd-macro (substring body 0 -2))))
(let ((calc-kbd-push-level (1+ calc-kbd-push-level)))
- (message "%s" "Saving modes; type Z' to restore")
+ ;; Avoid substituting the "'" character:
+ (message "%s" "Saving modes; type Z' to restore")
(recursive-edit))))))
(defun calc-kbd-pop ()
diff --git a/lisp/indent.el b/lisp/indent.el
index f52b729051..b0c1a021da 100644
--- a/lisp/indent.el
+++ b/lisp/indent.el
@@ -734,7 +734,9 @@ You can add or remove colons and then do
\\<edit-tab-stops-map>\\[edit-tab-stops
(while (> count 0)
(insert "0123456789")
(setq count (1- count))))
- (insert "\nTo install changes, type C-c C-c")
+ (insert (substitute-command-keys
+ (concat "\nTo install changes, type \\<edit-tab-stops-map>"
+ "\\[edit-tab-stops-note-changes]")))
(goto-char (point-min)))
(defun edit-tab-stops-note-changes ()
diff --git a/lisp/printing.el b/lisp/printing.el
index 534b45c772..d10de24e03 100644
--- a/lisp/printing.el
+++ b/lisp/printing.el
@@ -3040,7 +3040,7 @@ A. Interface:
I. PostScript printing:
- 1. You can generate a PostScript file (if you type C-u before activating
+ 1. You can generate a PostScript file (if you type \\[universal-argument]
before activating
menu) or PostScript temporary file for a directory, a buffer, a region
or a major mode, choosing 1-up, 2-up, 4-up or any other n-up printing;
after file generation, ghostview is activated using the file generated
@@ -3080,7 +3080,7 @@ I. PostScript printing:
`pr-ps-utility-alist'.
2. Operate the same way as option 1, but it sends directly the PostScript
- code (or put in a file, if you've typed C-u) or it uses ghostscript to
+ code (or put in a file, if you've typed \\[universal-argument]) or it
uses ghostscript to
print the PostScript file generated. It depends on option 18, if it's
turned on, it uses ghostscript; otherwise, it sends directly to
printer. If spooling is on (option 16), the PostScript code is saved
@@ -3089,7 +3089,7 @@ I. PostScript printing:
Instead of printing each buffer, region or major mode at once, you can
save temporarily the PostScript code generated in a buffer and print it
later. The option `Despool...' despools the PostScript spooling buffer
- directly on a printer. If you type C-u before choosing this option,
+ directly on a printer. If you type \\[universal-argument] before
choosing this option,
the PostScript code generated is saved in a file instead of sending it to
the printer. To spool the PostScript code generated you need to turn on
option 16. This option is enabled if spooling is on (option 16).
@@ -4183,7 +4183,8 @@ bottom."
(defun pr-help (&rest _ignore)
"Help for the printing package."
(interactive)
- (pr-show-setup pr-help-message "*Printing Help*"))
+ (pr-show-setup (substitute-command-keys pr-help-message)
+ "*Printing Help*"))
;;;###autoload
@@ -5036,7 +5037,8 @@ If menu binding was not done, calls `pr-menu-bind'."
(defun pr-show-setup (settings buffer-name)
(with-output-to-temp-buffer buffer-name
- (princ settings)
+ (with-current-buffer buffer-name
+ (insert settings))
(help-print-return-message)))
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index ba0adcc913..a3995e2969 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -8535,8 +8535,8 @@ POS defaults to the point."
(let ((p (cperl-get-here-doc-region pos)))
(or p (error "Not inside a HERE document"))
(narrow-to-region (car p) (cdr p))
- (message
- "When you are finished with narrow editing, type C-x n w")))
+ (message (substitute-command-keys
+ "When you are finished with narrow editing, type \\[widen]"))))
(defun cperl-select-this-pod-or-here-doc (&optional pos)
"Select the HERE-DOC (or POD section) at POS.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 67a15ce156: Use substitute-command-keys in a few more places,
Stefan Kangas <=