[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: menu-updating-frame is nil on X
From: |
Juri Linkov |
Subject: |
Re: menu-updating-frame is nil on X |
Date: |
Tue, 08 Nov 2005 14:43:43 +0200 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
>> In Emacs configured with '--with-x-toolkit=no' on i686-pc-linux-gnu
>> and run with `emacs -Q', `menu-updating-frame' is nil. This causes
>> some menu items to be permanently disabled due to the condition in
>> `menu-bar-menu-frame-live-and-visible-p' where `(display-multi-frame-p)'
>> returns `t'.
>
> The theory behind that code was that menu-updating-frame cannot
> possibly be nil on a display that supports multiple frames visible at
> the same time. How come the non-toolkit version doesn't bind
> menu-updating-frame to something non-nil? Can you please investigate?
Emacs built without a X toolkit doesn't have a separate frame for
the menu bar.
What do you think about the following change? Would it work in all cases?
Index: lisp/menu-bar.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/menu-bar.el,v
retrieving revision 1.278
diff -c -r1.278 menu-bar.el
*** lisp/menu-bar.el 1 Nov 2005 23:21:39 -0000 1.278
--- lisp/menu-bar.el 8 Nov 2005 12:43:03 -0000
***************
*** 1424,1431 ****
(defun menu-bar-menu-frame-live-and-visible-p ()
"Return non-nil if the menu frame is alive and visible.
The menu frame is the frame for which we are updating the menu."
! (let ((menu-frame (if (display-multi-frame-p) menu-updating-frame
! (selected-frame))))
(and (frame-live-p menu-frame)
(frame-visible-p menu-frame))))
--- 1424,1430 ----
(defun menu-bar-menu-frame-live-and-visible-p ()
"Return non-nil if the menu frame is alive and visible.
The menu frame is the frame for which we are updating the menu."
! (let ((menu-frame (or menu-updating-frame (selected-frame))))
(and (frame-live-p menu-frame)
(frame-visible-p menu-frame))))
--
Juri Linkov
http://www.jurta.org/emacs/
- menu-updating-frame is nil on X, Juri Linkov, 2005/11/07
- Re: menu-updating-frame is nil on X, Eli Zaretskii, 2005/11/07
- Re: menu-updating-frame is nil on X,
Juri Linkov <=
- Re: menu-updating-frame is nil on X, Eli Zaretskii, 2005/11/08
- Re: menu-updating-frame is nil on X, Juri Linkov, 2005/11/09
- Re: menu-updating-frame is nil on X, Eli Zaretskii, 2005/11/09
- Re: menu-updating-frame is nil on X, Juri Linkov, 2005/11/10
- Re: menu-updating-frame is nil on X, Eli Zaretskii, 2005/11/10
- Re: menu-updating-frame is nil on X, Juri Linkov, 2005/11/11