[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#53636: 29.0.50; face-remapping broken on master
From: |
Eli Zaretskii |
Subject: |
bug#53636: 29.0.50; face-remapping broken on master |
Date: |
Tue, 01 Feb 2022 22:09:35 +0200 |
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: 53636@debbugs.gnu.org, tsdh@gnu.org
> Date: Tue, 01 Feb 2022 20:38:53 +0100
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > So when we effectively renamed mode-line to mode-line-active, we broke
> > compatibility, since in some situations, such as the one described
> > here, what was previously done with the mode-line face must now be
> > done with mode-line-active face.
>
> But this is a bug, I think? You can see the same effect in Emacs 28 if
> you do:
>
> (face-remap-add-relative 'mode-line 'link-visited)
What do you suggest instead? to treat some basic faces specially
because we happen to know that they inherit from other basic faces?
That's ugly and fragile.
If we want to solve this cleanly and radically, I'd prefer to break
the vicious circle by removing the inheritance from basic faces
altogether. The basic faces are just that: they aren't supposed to
inherit from other basic faces. That would also decouple header-line
and everything else as a side effect.
> Making face remapping work reliably for these faces would be better, but
> I haven't looked at the code.
Maybe you will see something I don't, but in general face remapping
isn't magical, we must explicitly account for it where it might
matter, or it will not work. After all, all face remapping does is
add some members to a list, it doesn't actually change any faces. So
we need to do stuff like this:
if (! NILP (Vface_remapping_alist))
remapped_base_face_id
= lookup_basic_face (w, XFRAME (w->frame), base_face_id);
That's how face-remapping-alist takes its effect. If you want this to
work for inherited faces, you must do this for the parent face,
recursively, before you do it for the face in which you are
interested. You want to add the inheritance-chasing loop to basic
face look up? I don't.
- bug#53636: 29.0.50; face-remapping broken on master, Lars Ingebrigtsen, 2022/02/01
- bug#53636: 29.0.50; face-remapping broken on master,
Eli Zaretskii <=
- bug#53636: 29.0.50; face-remapping broken on master, Lars Ingebrigtsen, 2022/02/02
- bug#53636: 29.0.50; face-remapping broken on master, Eli Zaretskii, 2022/02/02
- bug#53636: 29.0.50; face-remapping broken on master, Lars Ingebrigtsen, 2022/02/02
- bug#53636: [External] : bug#53636: 29.0.50; face-remapping broken on master, Drew Adams, 2022/02/02
- bug#53636: 29.0.50; face-remapping broken on master, Eli Zaretskii, 2022/02/03
- bug#53636: 29.0.50; face-remapping broken on master, Lars Ingebrigtsen, 2022/02/03
- bug#53636: 29.0.50; face-remapping broken on master, Eli Zaretskii, 2022/02/03
- bug#53636: 29.0.50; face-remapping broken on master, Lars Ingebrigtsen, 2022/02/05
- bug#53636: 29.0.50; face-remapping broken on master, Eli Zaretskii, 2022/02/05
- bug#53636: [External] : bug#53636: 29.0.50; face-remapping broken on master, Drew Adams, 2022/02/05