[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: face-attribute and face-remapping-alist
From: |
Eli Zaretskii |
Subject: |
Re: face-attribute and face-remapping-alist |
Date: |
Wed, 31 Mar 2021 16:27:10 +0300 |
> From: Clément Pit-Claudel <cpitclaudel@gmail.com>
> Date: Wed, 31 Mar 2021 09:00:34 -0400
>
> On 3/31/21 2:58 AM, Eli Zaretskii wrote:
> > Sure, but the only change needed in all the cases you described in
> > order to return attributes that are aware of the remapping is to look
> > up the face in face-remapping-alist, before calling face-attribute.
>
> You need to look it up recursively, which adds to the complexity. And it's
> more complicated than that if you use the "inherit" argument, since you need
> to check whether the default face is remapped as well, and merge that with
> the real default face.
The issue described by the OP was of accessing the attribute's value,
not merging face attributes.
Merging faces is a separate issue. It is rare that an application
should need to merge faces, as Emacs does that automatically.