[Top][All Lists]

[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: Thu, 29 Nov 2018 18:30:54 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

On Thu, 29 Nov 2018 09:14:52 +0200 Eli Zaretskii <> wrote:

>> From: Stephen Berman <>
>> Cc:
>> Date: Wed, 28 Nov 2018 22:34:43 +0100
>> > So this is only about what propertize does?  And only when some of the
>> > later properties override earlier ones?
>> Well, it's at least about what propertize does, since that was the OP's
>> example (the first form above), which lead to my observation of the
>> difference with the second form.
> My reading of the code is that later face attributes override the
> earlier once, i.e. the attributes are processed in order, and :inherit
> doesn't have any precedence in this case.  Which seems like a sensible
> thing, but I'm not sure we want to document this implementation
> detail.  In general, having conflicting face attributes in the face
> definition is not a good idea anyway; the only sensible use case is
> when you want to change (i.e. override) some attribute of an existing
> face, and for that, putting the overriding attribute at the end is the
> natural thing to do.  IOW, Emacs seems to do what users should expect.

This makes sense and maybe it's not worth documenting.  On the other
hand, it wasn't obvious to me from looking in the Lisp manual that the
way prioritize and add-text-properties work is not related to what is
documented about the `face' property (giving priority to earlier not
later elements in the list).  Maybe I didn't read carefully enough.

Steve Berman

reply via email to

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