emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 2ca5558: Check for an input event before showing a


From: Glenn Morris
Subject: [Emacs-diffs] master 2ca5558: Check for an input event before showing a dialog box. (Bug#20813)
Date: Tue, 23 Jun 2015 18:02:32 +0000

branch: master
commit 2ca5558395c92b25b58478627b426c66f8e4f170
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    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.
---
 lisp/subr.el |    1 +
 src/fns.c    |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/lisp/subr.el b/lisp/subr.el
index df17310..5d40aaa 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -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)
diff --git a/src/fns.c b/src/fns.c
index 6bbb57f..cef2823 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -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);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]