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: Juanma Barranquero <lekktu <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 9722 <at> debbugs.gnu.org
Subject: bug#9722: list-colors-duplicates does not exclude enough colors on Windows
Date: Tue, 11 Oct 2011 13:24:04 +0200
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 (which, I'm sure you remember, is the one hardcoded in w32fns.c,
not the one from etc/rgb.txt).

> 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.

> would something break if we modify the list
> returned by that function to not include any duplicates in the first
> place?

I don't think any code would break, but you would need to add the
missing names at some other point, woudn't you?

    Juanma




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.