* lisp/subr.el (y-or-n-p): Enable commands that call this function
to be repeatable (bug#45999). This stopped working after this
function started using read-from-minibuffer.
* src/fns.c (Fyes_or_no_p): Ditto.
(format "(y, n or %s) "
(key-description
(vector help-char)))
- "(y or n) "
- )))))))
+ "(y or n) "))))))
+ ;; Preserve the actual command that eventually called
+ ;; `y-or-n-p' (otherwise `repeat' will be repeating
+ ;; `exit-minibuffer').
+ (real-this-command real-this-command))
(cond
(noninteractive
(setq prompt (funcall padded prompt))
specpdl_ref count = SPECPDL_INDEX ();
specbind (Qenable_recursive_minibuffers, Qt);
+ /* Preserve the actual command that eventually called `yes-or-no-p'
+ (otherwise `repeat' will be repeating `exit-minibuffer'). */
+ specbind (Qreal_this_command, Vreal_this_command);
while (1)
{
defsubr (&Sbuffer_hash);
defsubr (&Slocale_info);
defsubr (&Sbuffer_line_statistics);
+
+ DEFSYM (Qreal_this_command, "real-this-command");
}