From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.pretest.bugs,gmane.emacs.devel Subject: Re: Font-lock.el uses strange value for min-colors (Was x-display-color-cells returns wrong number) Date: Sun, 29 Feb 2004 22:58:52 +0100 Sender: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Message-ID: <762B05F4-6B02-11D8-B66E-00039363E640@swipnet.se> References: <14AB9AB8-6A0E-11D8-99DB-00039363E640@swipnet.se> <2914-Sun29Feb2004201424+0200-eliz@elta.co.il> <60951CF7-6AED-11D8-8672-00039363E640@swipnet.se> <2719-Sun29Feb2004232501+0200-eliz@elta.co.il> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (Apple Message framework v612) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1078092129 27255 80.91.224.253 (29 Feb 2004 22:02:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 29 Feb 2004 22:02:09 +0000 (UTC) Cc: harder@ifa.au.dk, emacs-devel@gnu.org, emacs-pretest-bug@gnu.org Original-X-From: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Sun Feb 29 23:02:00 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AxZ0Z-0000w1-00 for ; Sun, 29 Feb 2004 23:01:59 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AxZ0V-0006Fd-NX for gebp-emacs-pretest-bug@gmane.org; Sun, 29 Feb 2004 17:01:55 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1AxYzp-0005z1-GU for emacs-pretest-bug@gnu.org; Sun, 29 Feb 2004 17:01:13 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1AxYz1-0005Sj-HO for emacs-pretest-bug@gnu.org; Sun, 29 Feb 2004 17:00:54 -0500 Original-Received: from [213.115.192.53] (helo=mail2.norrnet.net) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AxYyU-00056f-BG; Sun, 29 Feb 2004 16:59:50 -0500 Original-Received: from stubby.bodenonline.com (stubby.bodenonline.com [193.201.16.94]) by mail2.norrnet.net (BorderWare MXtreme Mail Firewall) with ESMTP id A208F01CC6; Sun, 29 Feb 2004 22:59:45 +0100 (CET) Original-Received: from accessno42.bodenonline.com (accessno42.bodenonline.com [193.201.16.44]) by stubby.bodenonline.com (8.12.1/8.12.1) with ESMTP id i1TMoQ2R027166; Sun, 29 Feb 2004 23:50:27 +0100 In-Reply-To: <2719-Sun29Feb2004232501+0200-eliz@elta.co.il> Original-To: Eli Zaretskii X-Mailer: Apple Mail (2.612) X-BeenThere: emacs-pretest-bug@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.pretest.bugs:2254 gmane.emacs.devel:20208 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20208 >> A better way to find out the number of colors that can be displayed >> at the same time is (1 << DisplayPlanes(...)). There is no need to >> distinguish between visual types if number of colors is calculated >> this >> way. > > I don't know enough about X to even parse the last sentence, but I do > think display-color-cells should return the number of distinct colors > Emacs can use. It sounds like display-color-cells does that on every > platform except X (MS-Windows, MS-DOS, Unix tty, don't know about the > Mac). That function is advertised as one that returns the number of > distinct colors, so IMHO it had better do what we say it does. The number of planes it the same as the number of bits in a pixel, i.e. 8 for 256 color displays, 16 for 65536 colors, and so on. So on X the number of colors Emacs can use are (ash 1 (x-display-planes)) I can do the change, but I don't know if x-display-color-cells or display-color-cells should change yet. I'll have to check where else x-display-color-cells is used. I will do it within a day or so. Jan D.