unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Eli Zaretskii'" <eliz@gnu.org>, "'martin rudalics'" <rudalics@gmx.at>
Cc: 1077@debbugs.gnu.org
Subject: bug#1077: 23.0.60; x-create-frame: (wrong-type-argument number-or-marker-p nil)
Date: Tue, 30 Nov 2010 07:42:50 -0800	[thread overview]
Message-ID: <75E186DE94924B6DA0445107D7477FA6@us.oracle.com> (raw)
In-Reply-To: <E1PNObr-0006Rj-83@fencepost.gnu.org>

> 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.






  reply	other threads:[~2010-11-30 15:42 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-03 17:22 bug#1077: 23.0.60; x-create-frame: (wrong-type-argument number-or-marker-p nil) Drew Adams
2008-10-04 16:38 ` Drew Adams
2008-11-22 16:46   ` bug#670: " Drew Adams
2009-10-06 16:19     ` Drew Adams
2010-11-27  2:52       ` Drew Adams
2010-11-27  8:22         ` bug#1077: " Eli Zaretskii
2010-11-27 16:15           ` Drew Adams
2010-11-27 20:10             ` Eli Zaretskii
2010-11-27 23:32               ` Drew Adams
2010-11-28  7:21                 ` Eli Zaretskii
2010-11-28  9:50                   ` martin rudalics
2010-11-28 13:41                     ` Eli Zaretskii
2010-11-28 14:12                       ` martin rudalics
2010-11-28 17:29                         ` Drew Adams
2010-11-28 17:26                   ` Drew Adams
2010-11-28 17:50                     ` Eli Zaretskii
2010-11-28 18:42                       ` Drew Adams
2010-11-28 19:54                         ` Eli Zaretskii
2010-11-28 22:38                           ` Drew Adams
2010-11-28 20:43                         ` Stefan Monnier
2010-11-28 19:40                     ` Eli Zaretskii
2010-11-28 19:46                       ` Drew Adams
2010-11-28 20:23                         ` Eli Zaretskii
2010-11-29 10:56                       ` martin rudalics
2010-11-29 18:58                         ` Eli Zaretskii
2010-11-29 20:14                           ` martin rudalics
2010-11-29 21:18                             ` Eli Zaretskii
2010-11-29 21:33                               ` Drew Adams
2010-11-30  4:05                                 ` Eli Zaretskii
2010-11-30  7:56                                   ` martin rudalics
2010-11-30 11:23                                     ` Eli Zaretskii
2010-11-30 14:01                                       ` martin rudalics
2010-11-30 15:11                                         ` Eli Zaretskii
2010-11-30 15:56                                           ` Drew Adams
2010-11-30 17:07                                             ` martin rudalics
2010-11-30 17:57                                               ` Drew Adams
2010-11-30 19:49                                                 ` martin rudalics
2010-11-30 20:16                                                   ` Drew Adams
2010-11-30 18:20                                               ` Eli Zaretskii
2010-11-30 18:16                                             ` Eli Zaretskii
2010-11-30 19:16                                               ` Drew Adams
2010-11-30 17:05                                           ` martin rudalics
2010-11-30 17:57                                             ` Drew Adams
2010-11-30 18:27                                               ` Eli Zaretskii
2010-11-30 19:50                                                 ` martin rudalics
2010-11-30 20:18                                                   ` Drew Adams
2010-12-01  9:58                                                     ` martin rudalics
2010-12-01 15:13                                                       ` Drew Adams
2010-12-01 17:28                                                         ` martin rudalics
2010-12-01 18:19                                                           ` Drew Adams
2010-11-30 19:49                                               ` martin rudalics
2010-11-30 20:17                                                 ` Drew Adams
2010-11-30 18:18                                             ` Eli Zaretskii
2010-12-01  9:58                                               ` martin rudalics
2010-12-01 17:21                                                 ` Eli Zaretskii
2010-12-01 15:05                                       ` Lennart Borgman
2010-11-30 11:42                                     ` Eli Zaretskii
2010-11-30 15:42                                       ` Drew Adams [this message]
2010-11-30 18:12                                         ` Eli Zaretskii
2010-11-30 19:16                                           ` Drew Adams
2010-12-09 19:11                                           ` Eli Zaretskii
2010-12-01 15:48                                     ` Stefan Monnier
2010-12-01 17:27                                       ` martin rudalics
2010-11-30 20:21 ` Drew Adams
2010-11-30 21:28   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=75E186DE94924B6DA0445107D7477FA6@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=1077@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=rudalics@gmx.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).