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: Drew Adams
Subject: bug#1077: 23.0.60; x-create-frame: (wrong-type-argument number-or-marker-p nil)
Date: Tue, 30 Nov 2010 07:56:55 -0800

> > But if not entry for `menu-bar-lines' exists, calling
> > (frame-parameter ... 'menu-bar-lines) returns nil.
> 
> That's not guaranteed to be true.  You will see in the implementation
> of frame-parameter and frame-parameters that we return values for some
> frame parameters without ever looking at the frame's parameter alist.
> It's true that frame-parameter actually does look in frame's parameter
> alist when the value of menu-bar-lines is requested, but
> frame-parameters does not, at least for TTYs.

My impression (I don't have references to prove it) is that this general rule
_has_ worked, and it has only recently (in the last few years) been broken.  And
IIRC it was broken by Emacs Dev when trying to work around (fix) bugs introduced
wrt the tool-bar code.  IOW, my impression is that we ended up breaking this
behavior because that's how we decided to fix some bugs that were introduced.

This stuff (e.g. tool-bar code) became more complex during this process,
especially in conjunction with startup and the default frame alists.  Overall,
the tool-bar behavior might have been improved (dunno), but I'm not sure the
general handling of frame parameters didn't suffer.

Yidong might have something different to say about this.  My impression is only
that, an impression.  I believe he is familiar with the code and the changes.

> That said, I agree that any code which is called during frame creation
> should be able to avoid signaling an error.

I think a frame alist entry of `(menu-bar-lines)' should be handled correctly:
handled just the same as `(menu-bar-lines . 0)' and the same as having no entry.


> If so, this is a thing of the past, as we no longer need
> menu-bar-mode, menu-bar-lines alone is enough, right?

I'm not aware that there ever was a _frame parameter_ named `menu-bar-mode'.
Certainly there is none mentioned in the Emacs 20 Elisp manual.  There is a
`menu-bar-mode' _command_ (and mode).

> Even funnier, the ELisp manual shows an example of building a menu bar
> with two lines, see the node "Menu Bar" there.

And that should be possible.  If it isn't possible today because of some
limitations then it should be kept as a future possibility and put on the TODO
list (IMO).
 






reply via email to

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