From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#35005: 27.0.50; Fontification unexpectedly works with anonymous faces Date: Thu, 28 Mar 2019 18:14:28 +0200 Message-ID: <83r2arj7rv.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="237267"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 35005@debbugs.gnu.org To: Markus Triska Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 28 17:15:19 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h9XgU-000zTl-4H for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 Mar 2019 17:15:18 +0100 Original-Received: from localhost ([127.0.0.1]:38859 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9XgS-000410-R0 for geb-bug-gnu-emacs@m.gmane.org; Thu, 28 Mar 2019 12:15:16 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:47854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9XgF-0003lY-G7 for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2019 12:15:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h9XgE-00008a-Fh for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2019 12:15:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49258) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h9XgD-00008D-Q4 for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2019 12:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h9XgD-0008VW-LD for bug-gnu-emacs@gnu.org; Thu, 28 Mar 2019 12:15:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 28 Mar 2019 16:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35005 X-GNU-PR-Package: emacs Original-Received: via spool by 35005-submit@debbugs.gnu.org id=B35005.155378967732630 (code B ref 35005); Thu, 28 Mar 2019 16:15:01 +0000 Original-Received: (at 35005) by debbugs.gnu.org; 28 Mar 2019 16:14:37 +0000 Original-Received: from localhost ([127.0.0.1]:34569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h9Xfp-0008UD-5U for submit@debbugs.gnu.org; Thu, 28 Mar 2019 12:14:37 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33318) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h9Xfn-0008Tu-Ff for 35005@debbugs.gnu.org; Thu, 28 Mar 2019 12:14:35 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:39544) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9Xfh-0008Np-W4; Thu, 28 Mar 2019 12:14:30 -0400 Original-Received: from [176.228.60.248] (port=1942 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h9Xfg-0004fQ-Nr; Thu, 28 Mar 2019 12:14:29 -0400 In-reply-to: (message from Markus Triska on Tue, 26 Mar 2019 17:37:04 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:156882 Archived-At: > From: Markus Triska > 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.