From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs 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 Message-ID: <75E186DE94924B6DA0445107D7477FA6@us.oracle.com> References: <003e01c9257c$a385d800$0200a8c0@us.oracle.com> <009701c9263f$9cce7120$0200a8c0@us.oracle.com> <000001c94cc1$e10e9c40$0200a8c0@us.oracle.com> <8F1F8998D60341099C4204B7BDD8AD4F@us.oracle.com> <96BC00F728B94AC18A15EA95B66C5248@us.oracle.com> <83zksv5g7j.fsf@gnu.org> <0A475933984F4CDA855D91C8B7639E3B@us.oracle.com> <83fwum5xzk.fsf@gnu.org> <9F24875655894485A414CD785D95725B@us.oracle.com> <83ipzh9qze.fsf@gnu.org> <4CF386C9.5070909@gmx.at> <8362vg9ctt.fsf@gnu.org> <4CF409A3.1030906@gmx.at> <83y68b96c5.fsf@gnu.org> <71C125BECEDF4C5E9F703E5743F76893@us.oracle.com> <83r5e38nhg.fsf@gnu.org> <4CF4AE39.4050007@gmx.at> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1291183601 20274 80.91.229.12 (1 Dec 2010 06:06:41 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 1 Dec 2010 06:06:41 +0000 (UTC) Cc: 1077@debbugs.gnu.org To: "'Eli Zaretskii'" , "'martin rudalics'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 01 07:06:37 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PNfps-0008VS-F3 for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Dec 2010 07:06:36 +0100 Original-Received: from localhost ([127.0.0.1]:60504 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNfpr-0000zd-58 for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Dec 2010 01:06:35 -0500 Original-Received: from [140.186.70.92] (port=46111 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNeKO-0007lC-Rj for bug-gnu-emacs@gnu.org; Tue, 30 Nov 2010 23:30:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PNSO5-0000Fj-GT for bug-gnu-emacs@gnu.org; Tue, 30 Nov 2010 10:45:03 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PNSO5-0000Et-D9 for bug-gnu-emacs@gnu.org; Tue, 30 Nov 2010 10:45:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PNSHK-0006gd-Fx; Tue, 30 Nov 2010 10:38:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Nov 2010 15:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 1077 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 1077-submit@debbugs.gnu.org id=B1077.129113145525667 (code B ref 1077); Tue, 30 Nov 2010 15:38:02 +0000 Original-Received: (at 1077) by debbugs.gnu.org; 30 Nov 2010 15:37:35 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PNSGr-0006fw-RJ for submit@debbugs.gnu.org; Tue, 30 Nov 2010 10:37:34 -0500 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PNSGo-0006fi-FP for 1077@debbugs.gnu.org; Tue, 30 Nov 2010 10:37:31 -0500 Original-Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id oAUFh5qx019744 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 30 Nov 2010 15:43:06 GMT Original-Received: from acsmt354.oracle.com (acsmt354.oracle.com [141.146.40.154]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id oAUDF2en005820; Tue, 30 Nov 2010 15:43:00 GMT Original-Received: from abhmt021.oracle.com by acsmt354.oracle.com with ESMTP id 815926071291131771; Tue, 30 Nov 2010 07:42:51 -0800 Original-Received: from dradamslap1 (/10.159.217.8) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 30 Nov 2010 07:42:51 -0800 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcuQg8A03QijKfJ0RcO4uHYx2hsrdQAHDBkQ X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 30 Nov 2010 10:38:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:42024 Archived-At: > 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.