Subject: Re: bug#9722: list-colors-duplicates does not exclude enough colors on Windows

From: Eli Zaretskii <[email-masked]>
Date: Mon, 17 Oct 2011 19:15:22 +0200

> From: Juanma Barranquero <[email-masked]>
> Date: Mon, 17 Oct 2011 18:55:05 +0200
> Cc: [email-masked]
> 
> 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.

Perhaps so, but it's a separate issue.

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

Yes, but checking for "^System.*" must be in facemenu.el, while the
list could be on a w32-only file.  Not a bug deal either way.

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

If you feel that the cons outweigh the pros, go ahead and commit your
patch.