summaryrefslogtreecommitdiff
path: root/src/fns.c
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-07-11 14:51:34 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-07-11 14:56:06 +0200
commit4e8448b4bc5aae297c053080bc04208f5a0793e8 (patch)
tree289b59f822a9ece4c62c2ebae9e016e0db546bc5 /src/fns.c
parent4c41cef353cc68bbe432dc32fe9edffbea71dc6b (diff)
downloademacs-4e8448b4bc5aae297c053080bc04208f5a0793e8.tar.gz
Allow commands that call `yes-or-no-p' to be repeatable again
* 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.
Diffstat (limited to 'src/fns.c')
-rw-r--r--src/fns.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fns.c b/src/fns.c
index eb83471649e..1f57e675b12 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -2975,6 +2975,9 @@ if `last-nonmenu-event' is nil, and `use-dialog-box' is non-nil. */)
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)
{
@@ -6129,4 +6132,6 @@ The same variable also affects the function `read-answer'. */);
defsubr (&Sbuffer_hash);
defsubr (&Slocale_info);
defsubr (&Sbuffer_line_statistics);
+
+ DEFSYM (Qreal_this_command, "real-this-command");
}