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.
This commit is contained in:
Stefan Kangas 2021-10-05 19:52:23 +02:00 committed by Stefan Kangas
parent 42496e6470
commit 67a15ce156
4 changed files with 14 additions and 9 deletions

View file

@ -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 ()

View file

@ -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 ()

View file

@ -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)))

View file

@ -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.