From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chong Yidong Newsgroups: gmane.emacs.bugs Subject: bug#1133: Tool-bar and multi-tty Date: Sat, 11 Oct 2008 15:49:26 -0400 Message-ID: <877i8edi9l.fsf__37062.9045101397$1223755884$gmane$org@cyd.mit.edu> References: <873aj56v2p.fsf@cyd.mit.edu> <87prm8fkjn.fsf@cyd.mit.edu> <873aj48cd9.fsf@cyd.mit.edu> Reply-To: Chong Yidong , 1133@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1223755819 9359 80.91.229.12 (11 Oct 2008 20:10:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 11 Oct 2008 20:10:19 +0000 (UTC) Cc: dann@ics.uci.edu, 1133@emacsbugs.donarmstrong.com, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 11 22:11:17 2008 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.50) id 1Koknx-000851-T7 for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Oct 2008 22:11:14 +0200 Original-Received: from localhost ([127.0.0.1]:36189 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kokmt-0003Vs-Kv for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Oct 2008 16:10:07 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kokmp-0003Vf-DK for bug-gnu-emacs@gnu.org; Sat, 11 Oct 2008 16:10:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kokmn-0003Uu-JX for bug-gnu-emacs@gnu.org; Sat, 11 Oct 2008 16:10:02 -0400 Original-Received: from [199.232.76.173] (port=41658 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kokmn-0003Uk-Fk for bug-gnu-emacs@gnu.org; Sat, 11 Oct 2008 16:10:01 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:32869) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kokmn-0006Mr-0Q for bug-gnu-emacs@gnu.org; Sat, 11 Oct 2008 16:10:01 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9BK9wE4026892; Sat, 11 Oct 2008 13:09:58 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id m9BJt5LH022545; Sat, 11 Oct 2008 12:55:05 -0700 X-Loop: don@donarmstrong.com Resent-From: Chong Yidong Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 11 Oct 2008 19:55:04 +0000 Resent-Message-ID: Resent-Sender: don@donarmstrong.com X-Emacs-PR-Message: report 1133 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 1133-submit@emacsbugs.donarmstrong.com id=B1133.122375445021195 (code B ref 1133); Sat, 11 Oct 2008 19:55:04 +0000 Original-Received: (at 1133) by emacsbugs.donarmstrong.com; 11 Oct 2008 19:47:30 +0000 Original-Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id m9BJlRZG021181 for <1133@emacsbugs.donarmstrong.com>; Sat, 11 Oct 2008 12:47:29 -0700 Original-Received: by cyd.mit.edu (Postfix, from userid 1000) id 33D6257E0BD; Sat, 11 Oct 2008 15:49:26 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Sat, 11 Oct 2008 12:28:06 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Sat, 11 Oct 2008 16:10:02 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list 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:21404 Archived-At: Stefan Monnier writes: >> (image-exp `(tool-bar-find-image >> (if (display-color-p) >> ',(list xpm-lo-spec xpm-spec pbm-spec xbm-spec) >> ',(list pbm-spec xbm-spec xpm-lo-spec xpm-spec)))) > >> Calling tool-bar-local-item-from-menu from the tty loads the lo-spec >> images, whereas deferring this call until X is started up loads the >> hi-spec images. But deferring the call, as I suggested, doesn't seem to >> be satisfactory either. > > Why? The `if' is left unevaluated in the image-exp. So IIUC it's only > be evaluated later when the image is actually displayed. Aha: the number of display colors is checked earlier in the function. If we put that check into the image expression instead, everything works. I've just checked in a fix into CVS. I think this should resolve the problems between multi-tty and tool bars.