[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Overriding inherited face attributes
From: |
Stephen Berman |
Subject: |
Re: Overriding inherited face attributes |
Date: |
Wed, 28 Nov 2018 21:01:36 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
On Wed, 28 Nov 2018 18:18:25 +0200 Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Stephen Berman <stephen.berman@gmx.net>
>> Cc: help-gnu-emacs@gnu.org
>> Date: Wed, 28 Nov 2018 14:13:39 +0100
>>
>> >> (insert (propertize "hello" 'face '(:inherit (:foreground "orange")
>> >> :foreground "red")))
>> >>
>> >> makes the face display as red, and this seems to conflict with the above
>> >> documentation.
>> >
>> > It doesn't, because ':foreground "red"' is not the "underlying face".
>>
>> That occurred to me, but then I have to conclude I really don't
>> understand the doc, according to my reading of which the `inherit'
>> property should have higher priority by virtue of being earlier in the
>> list.
>
> If someone has concrete proposals for how to make the documentation of
> these aspects better, I'm open to suggestions.
It would be helpful to know from precisely which part of the
documentation it follows that evaluating this:
(insert (propertize "hello" 'face '(:foreground "red" :inherit
(:foreground "orange"))))
displays "hello" in orange while evaluating this:
(insert (propertize "hello" 'face '(:inherit (:foreground "orange")
:foreground "red")))
displays "hello" in red. I don't see how it follows from the passage in
the Lisp manual I cited ("Faces occurring earlier in the list have
higher priority") unless "occurring earlier in the list" and "higher
priority" have non-standard meanings, which should then also be defined
in the documentation. And from what you wrote above, the higher
priority of the `inherit' property is irrelevant in these examples,
since as you said "':foreground "red"' is not the "underlying face". So
can you point out the passage(s) in the manual from which the above
observed differences follow? Maybe once I see that I'll be satisfied
with the existing documentation, or else could try to suggest
improvements.
Steve Berman
- Overriding inherited face attributes, Boris Buliga, 2018/11/27
- Re: Overriding inherited face attributes, Stephen Berman, 2018/11/27
- Re: Overriding inherited face attributes, Eli Zaretskii, 2018/11/28
- Re: Overriding inherited face attributes, Stephen Berman, 2018/11/28
- Re: Overriding inherited face attributes, Eli Zaretskii, 2018/11/28
- Re: Overriding inherited face attributes, Stephen Berman, 2018/11/28
- Re: Overriding inherited face attributes, Eli Zaretskii, 2018/11/28
- Re: Overriding inherited face attributes,
Stephen Berman <=
- Re: Overriding inherited face attributes, Eli Zaretskii, 2018/11/28
- Re: Overriding inherited face attributes, Stephen Berman, 2018/11/28
- Re: Overriding inherited face attributes, Eli Zaretskii, 2018/11/29
- Re: Overriding inherited face attributes, Stephen Berman, 2018/11/29
- Re: Overriding inherited face attributes, Boris Buliga, 2018/11/28
- Re: Overriding inherited face attributes, Eli Zaretskii, 2018/11/29
Re: Overriding inherited face attributes, Boris Buliga, 2018/11/28