emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-24 618931b: Handle dead frame in menu-bar-non-minibu


From: Martin Rudalics
Subject: [Emacs-diffs] emacs-24 618931b: Handle dead frame in menu-bar-non-minibuffer-window-p. (Bug#19728)
Date: Sat, 31 Jan 2015 18:41:53 +0000

branch: emacs-24
commit 618931b5b614df307cfe74c2175287e3f6dfa2a0
Author: Martin Rudalics <address@hidden>
Commit: Martin Rudalics <address@hidden>

    Handle dead frame in menu-bar-non-minibuffer-window-p.  (Bug#19728)
    
    * menu-bar.el (menu-bar-non-minibuffer-window-p): Return nil when
    the menu frame is dead.  (Bug#19728)
---
 lisp/ChangeLog   |    5 +++++
 lisp/menu-bar.el |   12 +++++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 51d47a7..6cdaf14 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-31  Martin Rudalics  <address@hidden>
+
+       * menu-bar.el (menu-bar-non-minibuffer-window-p): Return nil when
+       the menu frame is dead.  (Bug#19728)
+
 2015-01-30  Fabián Ezequiel Gallina  <address@hidden>
 
        python.el: Handle tabs in python-indent-dedent-line.
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 25d41dc..e82c089 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -1737,12 +1737,14 @@ The menu frame is the frame for which we are updating 
the menu."
         (frame-visible-p menu-frame))))
 
 (defun menu-bar-non-minibuffer-window-p ()
-  "Return non-nil if selected window of the menu frame is not a minibuf window.
-
-See the documentation of `menu-bar-menu-frame-live-and-visible-p'
-for the definition of the menu frame."
+  "Return non-nil if the menu frame's selected window is no minibuffer window.
+Return nil if the menu frame is dead or its selected window is a
+minibuffer window.  The menu frame is the frame for which we are
+updating the menu."
   (let ((menu-frame (or menu-updating-frame (selected-frame))))
-    (not (window-minibuffer-p (frame-selected-window menu-frame)))))
+    (and (frame-live-p menu-frame)
+        (not (window-minibuffer-p
+              (frame-selected-window menu-frame))))))
 
 (defun kill-this-buffer ()     ; for the menu bar
   "Kill the current buffer.



reply via email to

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