bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#1077: 23.0.60; x-create-frame: (wrong-type-argument number-or-marker


From: Eli Zaretskii
Subject: bug#1077: 23.0.60; x-create-frame: (wrong-type-argument number-or-marker-p nil)
Date: Mon, 29 Nov 2010 23:18:34 +0200

> Date: Mon, 29 Nov 2010 21:14:27 +0100
> From: martin rudalics <address@hidden>
> CC: address@hidden, address@hidden
> 
>  > The frame we are creating is not yet ready, and is certainly not yet
>  > the selected frame!  Isn't that a bug? shouldn't we use
>  > menu-updating-frame instead of nil, in the above call to
>  > frame-parameter?
> 
> I think so.  Hopefully `menu-updating-frame' has the correct parameters
> in place.

Any objections to the patch below?  It fixes the error and the
following crash with Drew's recipe.


=== modified file 'lisp/menu-bar.el'
--- lisp/menu-bar.el    2010-08-13 13:26:13 +0000
+++ lisp/menu-bar.el    2010-11-29 21:08:59 +0000
@@ -966,7 +966,9 @@ mail status in mode line"))
 (define-key menu-bar-showhide-menu [menu-bar-mode]
   `(menu-item ,(purecopy "Menu-bar") toggle-menu-bar-mode-from-frame
              :help ,(purecopy "Turn menu-bar on/off")
-             :button (:toggle . (> (frame-parameter nil 'menu-bar-lines) 0))))
+             :button (:toggle . (> (frame-parameter (or menu-updating-frame
+                                                        (selected-frame))
+                                                    'menu-bar-lines) 0))))
 
 (defun menu-bar-set-tool-bar-position (position)
   (customize-set-variable 'tool-bar-mode t)






reply via email to

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