From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#9722: list-colors-duplicates does not exclude enough colors on Windows Date: Tue, 11 Oct 2011 21:39:29 +0200 Message-ID: <834nzfxqq6.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1318362054 4564 80.91.229.12 (11 Oct 2011 19:40:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 11 Oct 2011 19:40:54 +0000 (UTC) Cc: 9722@debbugs.gnu.org To: Juanma Barranquero Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 11 21:40:49 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RDiC0-0003x9-J4 for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Oct 2011 21:40:48 +0200 Original-Received: from localhost ([::1]:57256 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDiBz-0000pS-Qx for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Oct 2011 15:40:47 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:44924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDiBx-0000pC-7b for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2011 15:40:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDiBw-0007vR-7h for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2011 15:40:45 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36016) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDiBw-0007vH-66 for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2011 15:40:44 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RDiCD-0007N0-IU for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2011 15:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Oct 2011 19:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9722 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9722-submit@debbugs.gnu.org id=B9722.131836203228292 (code B ref 9722); Tue, 11 Oct 2011 19:41:01 +0000 Original-Received: (at 9722) by debbugs.gnu.org; 11 Oct 2011 19:40:32 +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 1RDiBj-0007MG-A1 for submit@debbugs.gnu.org; Tue, 11 Oct 2011 15:40:31 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RDiBh-0007M4-A2 for 9722@debbugs.gnu.org; Tue, 11 Oct 2011 15:40:30 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LSX000002A6RH00@a-mtaout20.012.net.il> for 9722@debbugs.gnu.org; Tue, 11 Oct 2011 21:39:28 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.124.91.138]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LSX000H42LRKU20@a-mtaout20.012.net.il>; Tue, 11 Oct 2011 21:39:27 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 11 Oct 2011 15:41:01 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:52543 Archived-At: > From: Juanma Barranquero > Date: Tue, 11 Oct 2011 13:24:04 +0200 > Cc: 9722@debbugs.gnu.org > > On Tue, Oct 11, 2011 at 08:01, Eli Zaretskii wrote: > > > However, there's something I'm missing here: why doesn't > > list-colors-duplicates recognize grayNN and greyNN as duplicates? > > We don't have them in the list that w32-default-color-map returns. > > That's why. The System* colors aren't either. What the current code > does on Windows is, basically, to detect duplicates when this > > (and (facemenu-color-equal COLOR1 COLOR2) > (assoc COLOR1 (w32-default-color-map))) > > is true. I.e., COLOR1 is only checked if present in the default color > list What is the purpose of checking w32-default-color-map? Is it solely for detecting the System* colors? That sounds an odd method of doing so. It is also fragile: it means any color not in w32-default-color-map will pass the duplicate test. > > As for duplicates such as "Dark Slate Gray" and "Dark Slate Grey", > > which are not filtered out because they _are_ in > > w32-default-color-map > > I'm not sure I understand. The dark*slate*gr?y colors are in the list, > and so they are detected as duplicates. No, they aren't. Don't you see the lines below? dark slate gray dark slate gray,dark slate grey,DarkSlateGray,DarkSlateGrey #2f4f4f dim gray dim gray,dim grey,DimGray,DimGrey #696969 slate gray slate gray,slate grey,SlateGray,SlateGrey #708090 light slate gray light slate gray,light slate grey,LightSlateGray,LightSlateGrey #778899 light gray light gray,light grey,LightGray,LightGrey #d3d3d3