[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a36ecc408a 2/2: * lisp/subr.el (y-or-n-p): Use substitute-command
From: |
Stefan Kangas |
Subject: |
master a36ecc408a 2/2: * lisp/subr.el (y-or-n-p): Use substitute-command-keys. |
Date: |
Tue, 4 Oct 2022 11:43:45 -0400 (EDT) |
branch: master
commit a36ecc408a30c76d287351b38956f998f84cb8a7
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>
* lisp/subr.el (y-or-n-p): Use substitute-command-keys.
---
lisp/subr.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/lisp/subr.el b/lisp/subr.el
index 51172b1cb2..c975c216bb 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').