emacs-devel
[Top][All Lists]
Advanced

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

Re: About the :distant-foreground face attribute


From: Jan Djärv
Subject: Re: About the :distant-foreground face attribute
Date: Wed, 8 Jan 2014 17:37:42 +0100

Hi.

8 jan 2014 kl. 15:49 skrev Chong Yidong <address@hidden>:

> So if you care about obeying gtk_selection_fg_color, why not just set it
> to :foreground?  When gtk_selection_bg_color is in use, we might as well
> use gtk_selection_fg_color with it.  Users who want a region background
> color that works properly with font lock might as well disable the GTK
> selection color stuff (it's unfortunate that it's the default, but oh
> well).


You obviously don't understand the issue, so I'll try to be very clear.

1) Font lock uses faces with specified fore- and background.
2) When text is marked with the mouse, the region face is applied on 
(overrides) the font lock face.
3) If the region face blindly uses the foreground from the region face (as per 
your suggestion), for example gtk_selection_fg_color, font lock is lost.  That 
is what bug 15668 is about.
4) On the other hand, if we always ignore the region foreground color, and use 
the font lock foregrpund color bug 15668 would be solved.  However, if the font 
lock foreground and the region background is similar, text is not readable.  So 
in that case, distant-foreground is used.
5) When making a theme, I suspect one wishes to specify all colors, not use 
some arbitrary generated color, which most certainly don't match the theme.  So 
we need a way to specify that color, hence distant-foreground.

Your proposals:
1) Use the selection foreground color when the selection background is used
=> Bug 15668.

2) Disable GTK selection color stuff
This might lead to unreadable text as the region bacground may be close to the 
foreground.

There is no "region background color that works properly with font lock" for 
all font lock faces, because the colors in font lock faces are unknown, esp. 
with themes.

If you can get your scheme to let theme designers specify all colors without 
adding a new face parameter, via the display property somehow, that could be 
something.  Not that it would make anything simpler or a better design, it just 
sounds more involved to me.  Using generated colors is right out IMHO, it makes 
themes impossible to fully specify.

        Jan D.




reply via email to

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