emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Support for fontification with anonymous faces


From: Markus Triska
Subject: Support for fontification with anonymous faces
Date: Sat, 30 Mar 2019 09:48:34 +0100

Dear all,

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?

This is also filed as issue #35005, where Eli suggested to ask here.

Thank you and all the best!
Markus



reply via email to

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