unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Markus Triska <triska@metalevel.at>
To: emacs-devel@gnu.org
Subject: Support for fontification with anonymous faces
Date: Sat, 30 Mar 2019 09:48:34 +0100	[thread overview]
Message-ID: <m2pnq8n3x9.fsf@metalevel.at> (raw)

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	other threads:[~2019-03-30  8:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2pnq8n3x9.fsf@metalevel.at \
    --to=triska@metalevel.at \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).