summaryrefslogtreecommitdiff
path: root/lisp/subr.el
diff options
context:
space:
mode:
authorStefan Kangas <stefankangas@gmail.com>2022-10-04 17:39:28 +0200
committerStefan Kangas <stefankangas@gmail.com>2022-10-04 17:39:28 +0200
commita36ecc408a30c76d287351b38956f998f84cb8a7 (patch)
treea4856c4b4214b365ee8426aa00556c9548bcc282 /lisp/subr.el
parentd9bd14975b60aa46408c67aa11a8a57bd5a8772a (diff)
downloademacs-a36ecc408a30c76d287351b38956f998f84cb8a7.tar.gz
emacs-a36ecc408a30c76d287351b38956f998f84cb8a7.tar.bz2
emacs-a36ecc408a30c76d287351b38956f998f84cb8a7.zip
* lisp/subr.el (y-or-n-p): Use substitute-command-keys.
Diffstat (limited to 'lisp/subr.el')
-rw-r--r--lisp/subr.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 51172b1cb2d..c975c216bb6 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -3547,11 +3547,12 @@ like) while `y-or-n-p' is running)."
(if (or (zerop l) (eq ?\s (aref prompt (1- l))))
"" " ")
(if dialog ""
- (if help-form
- (format "(y, n or %s) "
- (key-description
- (vector help-char)))
- "(y or n) "))))))
+ (substitute-command-keys
+ (if help-form
+ (format "(\\`y', \\`n' or \\`%s') "
+ (key-description
+ (vector help-char)))
+ "(\\`y' or \\`n') ")))))))
;; Preserve the actual command that eventually called
;; `y-or-n-p' (otherwise `repeat' will be repeating
;; `exit-minibuffer').