From: Stefan Kangas Date: Tue, 4 Oct 2022 15:39:28 +0000 (+0200) Subject: * lisp/subr.el (y-or-n-p): Use substitute-command-keys. X-Git-Tag: emacs-29.0.90~1856^2~25 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a36ecc408a30c76d287351b38956f998f84cb8a7;p=emacs.git * lisp/subr.el (y-or-n-p): Use substitute-command-keys. --- 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').