From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jason Rumney 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: 29 Feb 2004 22:39:21 +0000 Sender: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Message-ID: 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 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1078094660 20009 80.91.224.253 (29 Feb 2004 22:44:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 29 Feb 2004 22:44:20 +0000 (UTC) Cc: harder@ifa.au.dk, emacs-pretest-bug@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-pretest-bug-bounces+gebp-emacs-pretest-bug=gmane.org@gnu.org Sun Feb 29 23:44:13 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 1AxZfQ-0002xl-00 for ; Sun, 29 Feb 2004 23:44:12 +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 1AxZbS-0005Wo-UR for gebp-emacs-pretest-bug@gmane.org; Sun, 29 Feb 2004 17:40:06 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1AxZbO-0005UI-AK for emacs-pretest-bug@gnu.org; Sun, 29 Feb 2004 17:40:02 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1AxZas-0005Bh-Em for emacs-pretest-bug@gnu.org; Sun, 29 Feb 2004 17:40:01 -0500 Original-Received: from [194.106.33.36] (helo=server0027.freedom2surf.net) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.30) id 1AxZar-00059E-UH; Sun, 29 Feb 2004 17:39:30 -0500 Original-Received: from wanchan.jasonrumney.net (jasonrumney.net [195.137.77.250]) by server0027.freedom2surf.net (8.12.6/8.12.6/Debian-7) with ESMTP id i1TMdNdA016396; Sun, 29 Feb 2004 22:39:24 GMT Original-Received: from NYAUMO (nyaumo.jasonrumney.net [10.0.0.27]) by wanchan.jasonrumney.net (Postfix) with ESMTP id EC6AEDDD6A; Sun, 29 Feb 2004 22:39:22 +0000 (GMT) Original-To: Eli Zaretskii In-Reply-To: <2719-Sun29Feb2004232501+0200-eliz@elta.co.il> Original-Lines: 19 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 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:2256 gmane.emacs.devel:20210 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20210 "Eli Zaretskii" writes: > It sounds like display-color-cells does that on every platform > except X Since color-cells is originally an X concept, I think those other platforms only do that because of a lack of understanding about what X really means by color-cells. It does seem like display-planes is more reliable at least on X and W32 (where it was fixed to mean the same as X some time ago, since W32 has a different idea of planes), so how about changing the calculation of min-colors in faces.el to (>= (expt 2.0 (display-planes frame)) (car options)) 2.0 seems to be required (as opposed to 2) to force floating point in case of 32 bit displays, this might be a bug in Emacs, perhaps expt and other math functions should detect integer overflow and use floating point automatically?