[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9402: list-colors-display

From: Juri Linkov
Subject: bug#9402: list-colors-display
Date: Tue, 30 Aug 2011 12:10:51 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)

> 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")

reply via email to

[Prev in Thread] Current Thread [Next in Thread]