Check for an input event before showing a dialog box. (Bug#20813)
* lisp/subr.el (y-or-n-p): * src/fns.c (Fyes_or_no_p): Check last-input-event as well as last-nonmenu-event.
This commit is contained in:
parent
abe07ef01c
commit
2ca5558395
2 changed files with 2 additions and 1 deletions
|
@ -2348,6 +2348,7 @@ is nil and `use-dialog-box' is non-nil."
|
|||
(t (setq temp-prompt (concat "Please answer y or n. "
|
||||
prompt))))))))
|
||||
((and (display-popup-menus-p)
|
||||
last-input-event ; not during startup
|
||||
(listp last-nonmenu-event)
|
||||
use-dialog-box)
|
||||
(setq prompt (funcall padded prompt t)
|
||||
|
|
|
@ -2686,7 +2686,7 @@ if `last-nonmenu-event' is nil, and `use-dialog-box' is non-nil. */)
|
|||
CHECK_STRING (prompt);
|
||||
|
||||
if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event))
|
||||
&& use_dialog_box)
|
||||
&& use_dialog_box && ! NILP (last_input_event))
|
||||
{
|
||||
Lisp_Object pane, menu, obj;
|
||||
redisplay_preserve_echo_area (4);
|
||||
|
|
Loading…
Add table
Reference in a new issue