Commit 2ca55583 authored by Glenn Morris's avatar Glenn Morris
Browse files

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.
parent abe07ef0
......@@ -2348,6 +2348,7 @@ is nil and `use-dialog-box' is non-nil."
(t (setq temp-prompt (concat "Please answer y or n. "
((and (display-popup-menus-p)
last-input-event ; not during startup
(listp last-nonmenu-event)
(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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment