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: Mon, 17 Oct 2011 18:55:05 +0200
On Mon, Oct 17, 2011 at 18:41, Eli Zaretskii <eliz <at> gnu.org> wrote:

> It doesn't sound TRT to me to use w32-default-color-map for the
> purpose of retaining some special colors in the list.

I doesn't seem TRT to me either. My proposed patch removed that
dependency. In fact, I believe that w32-default-color-map should be
declared obsolete, to be turned into an internal-only function in some
future release. There's no real point to have it exposed to elisp,
other than using it in list-colors-duplicates.

>  I think it
> would be cleaner to have a separate (much shorter) list of colors that
> should not be removed even if their RGB values are identical to other
> colors already present in the list produced by defined-colors.

We can add that list, but currently, only colors named System.* are in
that category. Checking for "^System" or populating that list are both
very ad hoc fixes for a very specific Windows problem.

> If you agree, let's create such a list, put it on w32-fns.el, and use
> it in facemenu.el.
>
> OK?

I'm not sure.

Pros:
- The new list could be expanded by the user (if exposed to elisp as a
list and not a function)
- It does not depend on the reserved colors all being called System.*

Contras:
- It does not remove the need for w32_color_map /
Fw32_default_color_map, because these have another use (default color
list in case etc/rgb.txt is not found).
- It adds a new function or variable and a bit of complexity, for what
is just filtering out a few colors.

    Juanma




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

Previous Next


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