GNU bug report logs -
#1077
23.0.60; x-create-frame: (wrong-type-argument number-or-marker-p nil)
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Fri, 3 Oct 2008 17:30:02 UTC
Severity: normal
Tags: moreinfo
Merged with 670
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #138 received at 1077 <at> debbugs.gnu.org (full text, mbox):
> Btw, the code which injects this nil into the frame parameters is no
> other than oneonone.el itself. It has this part:
>
> (defcustom 1on1-minibuffer-frame-alist
> (list
> (or (assq 'foreground-color minibuffer-frame-alist)
> (cons 'foreground-color 1on1-minibuffer-frame-foreground))
> [...]
> (or (assq 'menu-bar-lines minibuffer-frame-alist)
> (cons 'menu-bar-lines nil))
> ^^^^^^^^^^^^^^^^^^^^^^^^^
>
> If I replace this with `(cons 'menu-bar-lines 0)', the original
> problem goes away without any changes in menu-bar.el.
>
> Drew, any reason not to make that change in your package?
OK, I've made that change.
However, Emacs has the _general convention_ that a nil-valued frame parameter is
the same as an absence of that parameter. Not having parameter `foo' present as
one of a frame's parameters is the same as having `(foo)' as the parameter cons.
This is true (should be true) for predefined parameters and for user-defined
frame parameters. It is general behavior, and should just work (IMO).
And note that the doc Martin cites, in the Elisp manual, was explicitly _added_
for Emacs 21, presumably because this is important (not to be missed) - it is
not present in the Emacs 20 Elisp manual:
Elisp 20 manual:
`menu-bar-lines'
The number of lines to allocate at the top of the frame for a menu
bar. The default is 1. *Note Menu Bar::. (In Emacs versions
that use the X toolkit, there is only one menu bar line; all that
matters about the number you specify is whether it is greater than
zero.)
Elisp 21 manual:
menu-bar-lines
The number of lines to allocate at the top of the frame for a menu bar. The
default is 1. A value of nil means don't display a menu bar. See Menu Bar. (The
X toolkit and GTK allow at most one menu bar line; they treat larger values as
1.)
FWIW (not much), I have this change-log comment in oneonone.el from 2005/05/28:
;; Corrected 1on1-minibuffer-frame-alist and
;; 1on1-special-display-frame-alist for menu-bar-lines (nil).
Dunno what that was a change _from_, unfortunately. ;-)
Thanks for fixing this. I do think that a value of nil should behave normally,
however, i.e., behave the same as a missing `menu-bar-lines' entry, which also
means the same as a `(menu-bar-lines . 0)' entry.
This bug report was last modified 14 years and 226 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.