]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/subr.el (y-or-n-p): Use substitute-command-keys.
authorStefan Kangas <stefankangas@gmail.com>
Tue, 4 Oct 2022 15:39:28 +0000 (17:39 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Tue, 4 Oct 2022 15:39:28 +0000 (17:39 +0200)
lisp/subr.el

index 51172b1cb2dd651f4fe8d7a053d5e16df44ce032..c975c216bb6f0ccd0205911a62649c6ea31ff9c1 100644 (file)
@@ -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').