[Top][All Lists]

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

Re: Overriding inherited face attributes

From: Eli Zaretskii
Subject: Re: Overriding inherited face attributes
Date: Wed, 28 Nov 2018 09:51:06 +0200

> From: Boris Buliga <>
> Date: Wed, 28 Nov 2018 09:39:29 +0200
> Cc:
>   > (propertize "hello" 'face '(:foreground "red" :inherit (:foreground
> "orange")))
>   #("hello" 0 5 (face (:foreground "red" :inherit (:foreground "orange"))))
>   ;; results in an orange text
>   > (propertize "hello" 'face '((:foreground "red") (:inherit (:foreground
> "orange"))))
>   #("hello" 0 5 (face ((:foreground "red") (:inherit ...))))
>   ;; results in a red text
> To me, it's still confusing. Why in the first example I have an orange text
> and
> in the second one - red?

Isn't the second example simply wrong syntax-wise?  Why did you use an
extra level of parentheses?

> 2. And there is a part saying something I don't quite understand about
> inheritance.
> > Attributes from inherited faces are merged into the face like an
> underlying
> > face would be, with higher priority than underlying faces.
> This one looks good to me. If I understand this correctly - inherited face
> attributes behave as usual face attributes.

They behave the same as attributes of the underlying face, but they
override the underlying face where both specify the same attributes.

reply via email to

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