From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#9722: list-colors-duplicates does not exclude enough colors on Windows Date: Tue, 11 Oct 2011 22:54:22 +0200 Message-ID: References: <834nzfxqq6.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1318366559 2060 80.91.229.12 (11 Oct 2011 20:55:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 11 Oct 2011 20:55:59 +0000 (UTC) Cc: 9722@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Oct 11 22:55:55 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 1RDjMc-0000nK-Ce for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Oct 2011 22:55:50 +0200 Original-Received: from localhost ([::1]:39095 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDjMb-00040H-LK for geb-bug-gnu-emacs@m.gmane.org; Tue, 11 Oct 2011 16:55:49 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:50966) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDjMX-0003zv-1p for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2011 16:55:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RDjMV-0007uY-Rs for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2011 16:55:45 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38682) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RDjMV-0007uU-Q4 for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2011 16:55:43 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RDjMo-0000e7-0v for bug-gnu-emacs@gnu.org; Tue, 11 Oct 2011 16:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 11 Oct 2011 20:56: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.13183665302447 (code B ref 9722); Tue, 11 Oct 2011 20:56:01 +0000 Original-Received: (at 9722) by debbugs.gnu.org; 11 Oct 2011 20:55:30 +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 1RDjMH-0000dP-OV for submit@debbugs.gnu.org; Tue, 11 Oct 2011 16:55:30 -0400 Original-Received: from mail-vx0-f172.google.com ([209.85.220.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RDjMF-0000dC-7t for 9722@debbugs.gnu.org; Tue, 11 Oct 2011 16:55:27 -0400 Original-Received: by vcbfo11 with SMTP id fo11so5405vcb.3 for <9722@debbugs.gnu.org>; Tue, 11 Oct 2011 13:55:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=aJgbHI+r3y2TSxoKSEYNYBGtI2nrKGbZznh6yzCGSyQ=; b=HDReP++KyNYIwRUL+S4ntab1rNVc9Y6ixM+8qttxSrCNwZ1i/NVoMd0WoQr924j2I/ Ll71q6swYnvUygFZU2xrgzhD4PUjvFmuGQIOtA6DA3QtzX8PDAaTrJiEazWi8yoECfPJ QZ3dx2Iusg8wYU9bnTxzVA4j0UP98ueKtIcnw= Original-Received: by 10.68.56.72 with SMTP id y8mr2068874pbp.82.1318366502335; Tue, 11 Oct 2011 13:55:02 -0700 (PDT) Original-Received: by 10.143.165.16 with HTTP; Tue, 11 Oct 2011 13:54:22 -0700 (PDT) In-Reply-To: <834nzfxqq6.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 11 Oct 2011 16:56:02 -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:52546 Archived-At: On Tue, Oct 11, 2011 at 21:39, Eli Zaretskii wrote: > What is the purpose of checking w32-default-color-map? =C2=A0Is it solely > for detecting the System* colors? Well, I don't really know, but in that function that's the only thing it is used for. revno:59445, which introduced list-colors-duplicates and the use of w32-default-color-map, removed the following comment ;; Identify duplicate colors by the name rather than the color ;; value. For example, on MS-Windows, logical colors are added to ;; the list that might have the same value but have different ;; names and meanings. For example, `SystemMenuText' (the color ;; w32 uses for the text in menu entries) and `SystemWindowText' ;; (the default color w32 uses for the text in windows and ;; dialogs) may be the same display color and be adjacent in the ;; list. Detecting duplicates by name insures that both of these ;; colors remain despite identical color values. so it seems that was the only intention. BTW, if we remove the call to w32-d-c-m from list-colors-duplicates, its only use will be in w32fns.c:Fx_open_connection (to initialize Vw32_color_map) and then it is no longer necessary to have it as a lisp level function. > That sounds an odd method of doing so. Yes. > It is also fragile: it means any color not in > w32-default-color-map will pass the duplicate test. Not sure what you mean with "pass the duplicate test". It means that any color not in w32-default-color-map will never be considered duplicate of another color. > No, they aren't. =C2=A0Don't you see the lines below? > > =C2=A0dark slate gray =C2=A0 =C2=A0 =C2=A0 dark slate gray,dark slate gre= y,DarkSlateGray,DarkSlateGrey =C2=A0#2f4f4f > =C2=A0dim gray =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0dim gray,d= im grey,DimGray,DimGrey =C2=A0#696969 > =C2=A0slate gray =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0slate gray,slat= e grey,SlateGray,SlateGrey =C2=A0#708090 > =C2=A0light slate gray =C2=A0 =C2=A0 =C2=A0light slate gray,light slate g= rey,LightSlateGray,LightSlateGrey =C2=A0#778899 > =C2=A0light gray =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0light gray,ligh= t grey,LightGray,LightGrey =C2=A0#d3d3d3 Yes, I see them. That means that list-colors-duplicates is correctly detecting them as duplicates: ELISP> (list-colors-duplicates '("black" "dark slate gray" "dark slate gray" "dark slate grey" "DarkSlateGray" "DarkSlateGrey")) (("black") ("dark slate gray" "DarkSlateGrey" "DarkSlateGray" "dark slate grey" "dark slate gray")) Or am I missing something? =C2=A0 =C2=A0 Juanma