GNU bug report logs - #9722
list-colors-duplicates does not exclude enough colors on Windows

Previous Next

Package: emacs;

Reported by: Juanma Barranquero <lekktu <at> gmail.com>

Date: Mon, 10 Oct 2011 22:51:01 UTC

Severity: minor

Done: Juanma Barranquero <lekktu <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Juanma Barranquero <lekktu <at> gmail.com>
Cc: 9722 <at> debbugs.gnu.org
Subject: bug#9722: list-colors-duplicates does not exclude enough colors on Windows
Date: Tue, 11 Oct 2011 21:39:29 +0200
> From: Juanma Barranquero <lekktu <at> gmail.com>
> Date: Tue, 11 Oct 2011 13:24:04 +0200
> Cc: 9722 <at> debbugs.gnu.org
> 
> On Tue, Oct 11, 2011 at 08:01, Eli Zaretskii <eliz <at> gnu.org> 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




This bug report was last modified 13 years and 272 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.