diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2022-07-11 14:51:34 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2022-07-11 14:56:06 +0200 |
commit | 4e8448b4bc5aae297c053080bc04208f5a0793e8 (patch) | |
tree | 289b59f822a9ece4c62c2ebae9e016e0db546bc5 /src/fns.c | |
parent | 4c41cef353cc68bbe432dc32fe9edffbea71dc6b (diff) | |
download | emacs-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.c | 5 |
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"); } |