unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Markus Triska <triska@metalevel.at>
To: 35005@debbugs.gnu.org
Subject: bug#35005: 27.0.50; Fontification unexpectedly works with anonymous faces
Date: Tue, 26 Mar 2019 17:37:04 +0100	[thread overview]
Message-ID: <m25zs54mof.fsf@metalevel.at> (raw)


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?

Thank you and all the best!
Markus

In GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin18.0.0, X toolkit, Xaw scroll bars)
 of 2018-11-15 built on mt-computer
Repository revision: b4eb908f858284a7962851fd99c94598f76afa6f
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000







             reply	other threads:[~2019-03-26 16:37 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-26 16:37 Markus Triska [this message]
2019-03-28 16:14 ` bug#35005: 27.0.50; Fontification unexpectedly works with anonymous faces Eli Zaretskii
2019-10-31 17:24   ` Lars Ingebrigtsen
2019-10-31 20:38     ` Stefan Monnier
2019-11-01 13:13       ` Lars Ingebrigtsen
     [not found]       ` <871rur4u4j.fsf@gnus.org>
2019-11-02  9:10         ` Markus Triska
     [not found]         ` <87sgn6abjw.fsf@metalevel.at>
2019-11-02 15:07           ` Lars Ingebrigtsen
     [not found]           ` <87mudee2pk.fsf@gnus.org>
2019-11-09 17:43             ` Markus Triska
     [not found]             ` <87y2wpndxs.fsf@metalevel.at>
2019-11-09 18:01               ` Stefan Monnier
     [not found]               ` <jwva795ue1u.fsf-monnier+emacs@gnu.org>
2019-11-09 20:02                 ` Lars Ingebrigtsen
     [not found]                 ` <87tv7czulh.fsf@gnus.org>
2019-11-09 21:02                   ` Markus Triska
     [not found]                   ` <87imnszrsx.fsf@metalevel.at>
2019-11-09 21:10                     ` Stefan Monnier
2019-11-10  1:52                     ` Drew Adams
     [not found]                     ` <jwvd0e0u5f7.fsf-monnier+emacs@gnu.org>
2019-11-09 21:29                       ` Markus Triska
2019-11-14  9:00                       ` Eli Zaretskii
2019-10-31 21:09     ` Markus Triska

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=m25zs54mof.fsf@metalevel.at \
    --to=triska@metalevel.at \
    --cc=35005@debbugs.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).