GNU bug report logs - #9402
list-colors-display

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> jurta.org>

Date: Mon, 29 Aug 2011 19:55:01 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 9402 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: "Jan D." <jan.h.d <at> swipnet.se>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 9402 <at> debbugs.gnu.org
Subject: Re: bug#9402: list-colors-display
Date: Tue, 30 Aug 2011 12:10:51 +0300
> That is on purpose.  Say a user customizes a face to use
> gtk_selection_fg_color and saves it.  He then starts an Emacs compiled
> without Gtk+.  What color shall Emacs use then?

Exactly the same problem exists for all other conditional
face customizations.

What if a user customizes a face on X for min-colors 88 and starts Emacs on
a tty with 8 colors?  Or customizes a face to "color-255" on xterm-256color
and starts Emacs on X?  Or customizes a face for light background and
starts Emacs on dark background?  Or customizes a face for bold and starts
Emacs where bold is not supported?  And so on.

Of course, graceful degradation to some closer colors could help,
but the result would not be what the user has customized.

To avoid these problems, customize-face should retain the conditional
part of the face definition when saving the modified face.

So e.g. after customizing `region' to some other colors:

    (((class color) (min-colors 88) (background light) (type gtk))
     :foreground "white"
     :background "black")

And after restoring the original default colors the condition
will remain intact in `custom-set-faces':

    (((class color) (min-colors 88) (background light) (type gtk))
     :foreground "gtk_selection_fg_color"
     :background "gtk_selection_bg_color")




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

Previous Next


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