emacs-devel
[Top][All Lists]
Advanced

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

Re: Faces: How to clear an attribute while continuing to inherit other a


From: Dave Goel
Subject: Re: Faces: How to clear an attribute while continuing to inherit other attributes?
Date: Thu, 10 Oct 2019 13:50:33 -0400


Of course, but that runs counter to the philosophy of inheritance. If you changed the default, you have to then go back and change all such faces. 

Again, if it was something like :underline or :bold or :height, you wouldn't see this problem: setting them to nil would remove any inheritance, and then, whenever you change the 'default face, your face's final resolved value automatically uses that.   

It seems that :fg and :bg also try to implement precisely that (providing a nil option as well as 'unspecified), but then don't do the final step correctly.
 
It seems that the design of faces goes out of its way to carefully distinguish nil from 'unspecified, precisely to allow you to clear an attribute..




On Thu, Oct 10, 2019 at 1:37 PM Eli Zaretskii <address@hidden> wrote:
> From: Dave Goel <address@hidden>
> Date: Thu, 10 Oct 2019 11:56:21 -0400
> Cc: address@hidden
>
> > What do you mean by "default foreground" here?
>
> I mean: The foreground of the face called 'default.

Then you could simply set the foreground of your face to be the same
as of the default face by using set-face-attribute, no?

reply via email to

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