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: Stefan Monnier
Subject: Re: About the :distant-foreground face attribute
Date: Sun, 12 Jan 2014 17:59:30 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> - Allow :foreground to take the value of (fallback COLOR) or something
>   like that, which would be equivalent to setting :foreground to
>   unspecified and :distant-foreground to COLOR.

This syntax implies that a face can't set both :foreground
and :distant-foreground at the same time, even tho the combination of
the two is meaningful (it means "use color X if that's readable and
color Y otherwise").

So I think it makes more sense to use a syntax that can specify both,
such as (COLOR . FALLBACK) or (choose COLOR1 COLOR2).

Now, what happens in the following case:
- face1 sets foreground to (choose COLOR1 COLOR2)
- face2 sets foreground to COLOR3 and inherits from face1.
Is the resulting "merge" equivalent to COLOR3 or to (choose COLOR3
COLOR2) or to (choose COLOR3 COLOR1 COLOR2)?
I think, to be a useful feature, the merge can't be COLOR3, so it would
have to be (choose COLOR3 COLOR2) or (choose COLOR3 COLOR1 COLOR2).
Is that really better than what we have now?

But now I wonder: what's the benefit from folding this "alternate" color
into :foreground compared to having it in a new
property :distant-foreground?

>   (We still need a replacement term for "distant foreground".  As
>   mentioned before, this term sounds nonsensical.)

Agreed.  Maybe :alternative-foreground?


        Stefan



reply via email to

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