GNU bug report logs -
#35005
27.0.50; Fontification unexpectedly works with anonymous faces
Previous Next
Reported by: Markus Triska <triska <at> metalevel.at>
Date: Tue, 26 Mar 2019 16:36:01 UTC
Severity: normal
Tags: fixed
Found in version 27.0.50
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Markus Triska <triska <at> metalevel.at>
> Date: Tue, 26 Mar 2019 17:37:04 +0100
>
>
> The Elisp info material states in "39.12 Faces":
>
> Many parts of Emacs require named faces, and do not accept
> anonymous faces. These include the functions documented in Attribute
> Functions, and the variable ‘font-lock-keywords’ (see Search-based
> Fontification). Unless otherwise stated, we will use the term “face”
> to refer only to named faces.
>
> However, when I start Emacs with "emacs -Q", and then evaluate in
> the *scratch* buffer the form:
>
> (progn
> (font-lock-add-keywords nil '(("hello" 0 '(:background "green")) t))
> (insert "hello"))
>
> then I see that "hello" is inserted and highlighted in green, apparently
> due to search-based fontification where an anonymous face is specified!
>
> I am currently working on an application where this functionality (i.e.,
> anonymous faces that can be specified for fontification) would be
> extremely useful. Could you please consider supporting this feature,
> and - if this already works as intended - officially document it?
I suggest to ask on emacs-devel whether the documentation is correct
or not. It's possible that there are some subtle use cases where
anonymous faces won't work in this situation. The real experts on
this matter don't read the bug list.
This bug report was last modified 5 years and 188 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.