From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#13917: 24.3.50; Elisp manual: Font Lock Mode Date: Fri, 01 Nov 2019 17:48:11 +0100 Message-ID: <877e4jy244.fsf@gnus.org> References: <87txojjjkq.fsf@phil.uni-goettingen.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="44518"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 13917@debbugs.gnu.org To: Joost Kremers Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 01 17:49:24 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.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iQa71-000BRE-Uc for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Nov 2019 17:49:24 +0100 Original-Received: from localhost ([::1]:41416 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQa70-00023T-LH for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Nov 2019 12:49:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37379) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQa6h-00023A-VN for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 12:49:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iQa6g-0006jV-Rh for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 12:49:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48160) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iQa6g-0006i0-Kp for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 12:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iQa6g-0008Ak-Fh for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 12:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Nov 2019 16:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13917 X-GNU-PR-Package: emacs Original-Received: via spool by 13917-submit@debbugs.gnu.org id=B13917.157262689831350 (code B ref 13917); Fri, 01 Nov 2019 16:49:02 +0000 Original-Received: (at 13917) by debbugs.gnu.org; 1 Nov 2019 16:48:18 +0000 Original-Received: from localhost ([127.0.0.1]:56981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQa5x-00089a-QH for submit@debbugs.gnu.org; Fri, 01 Nov 2019 12:48:18 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:39408) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQa5v-00089R-TZ for 13917@debbugs.gnu.org; Fri, 01 Nov 2019 12:48:16 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iQa5r-00080R-FC; Fri, 01 Nov 2019 17:48:13 +0100 In-Reply-To: <87txojjjkq.fsf@phil.uni-goettingen.de> (Joost Kremers's message of "Sun, 10 Mar 2013 17:39:01 +0100") 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:170634 Archived-At: Joost Kremers writes: > The Elisp manual, info node "(elisp) Search-based Fontification" states > the following: > > ,---- > | `(MATCHER . FACESPEC)' > | In this kind of element, FACESPEC is an expression whose value > | specifies the face to use for highlighting. In the simplest case, > | FACESPEC is a Lisp variable (a symbol) whose value is a face name. > | > | ;; Highlight occurrences of `fubar', > | ;; using the face which is the value of `fubar-face'. > | ("fubar" . fubar-face) > | > | However, FACESPEC can also evaluate to a list of this form: > | > | (face FACE PROP1 VAL1 PROP2 VAL2...) > | > | to specify the face FACE and various additional text properties to > | put on the text that matches. If you do this, be sure to add the > | other text property names that you set in this way to the value of > | `font-lock-extra-managed-props' so that the properties will also > | be cleared out when they are no longer appropriate. Alternatively, > | you can set the variable `font-lock-unfontify-region-function' to > | a function that clears these properties. *Note Other Font Lock > | Variables::. > `---- > > However, a font lock entry of the type > > ,---- > | (MATCHER . (face FACE PROP1 VAL1 PROP1 VAL2)) > `---- > > does not actually work. What works is any of the forms: > > ,---- > | (MATCHER . (0 (face FACE PROP1 VAL1 PROP1 VAL2))) > | (MATCHER 0 (face FACE PROP1 VAL1 PROP1 VAL2)) > | (MATCHER (0 (face FACE PROP1 VAL1 PROP1 VAL2))) > `---- > > (Where the first two are of course equivalent). Hm... is this a bug in the documentation or the code, though? It seems like it would be logical for the described syntax to work, doesn't it? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no