[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug#35005: 27.0.50; Fontification unexpectedly works with anonymous
From: |
Stefan Monnier |
Subject: |
Re: bug#35005: 27.0.50; Fontification unexpectedly works with anonymous faces |
Date: |
Thu, 31 Oct 2019 16:38:38 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> I'm not sure whether this was ever brought up on emacs-devel? I
> wondered about that restriction myself -- I could see why it might be an
> issue (some parts of the font locking machinery checking for whether an
> element is a list and interpreting is as something other than a face),
> but it would be nice if this worked with anonymous faces.
>
> Does anybody know what the manual is referring to here, or whether it's
> an outdated restriction that has gone away?
AFAIK anonymous faces work fine in font-lock. They can be a bit more
delicate to us because many places that accept faces also accept lists
(either of faces or of other things) but in general there's no real
restriction that I know of.
So I think the "do not accept" part is not true (any more?), but it's
still the case that you're generally better off using named faces
when possible.
Stefan