From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.help Subject: Re: font lock woes Date: 6 Mar 2013 20:27:01 GMT Message-ID: References: NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1362621794 27168 80.91.229.3 (7 Mar 2013 02:03:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Mar 2013 02:03:14 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Mar 07 03:03:36 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UDQBE-0003xy-Gb for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Mar 2013 03:03:36 +0100 Original-Received: from localhost ([::1]:42927 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDQAs-0004aY-Ru for geh-help-gnu-emacs@m.gmane.org; Wed, 06 Mar 2013 21:03:14 -0500 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 49 Original-X-Trace: individual.net /q++aq56nxzGNoexVgtd4AhYmdoB3rD2fUNqx4e0f1E1AFUpn+7Xt07AZtV+ZDJP7T Cancel-Lock: sha1:miKi+PVim4rVKcRfH11tB+XUGHE= Mail-Copies-To: nobody X-Editor: Emacs of course! User-Agent: slrn/pre1.0.0-18 (Linux) Original-Xref: usenet.stanford.edu gnu.emacs.help:197114 X-Mailman-Approved-At: Wed, 06 Mar 2013 21:03:00 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:89399 Archived-At: Stefan Monnier wrote: > Hmm... I can't find your previous email, but I now notice there are > 2 differences in the above lines. I focused on the `how' argument to > font-lock-add-keywords, but the other important one is that > > (font-lock-add-keywords > nil `((,(regexp-quote "{++") . '(face cm-addition-face read-only t))) t) > > should be > > (font-lock-add-keywords > nil `((,(regexp-quote "{++") (0 '(face cm-addition-face read-only t)))) t) > > because the (REGEXP . FACE) form only works if FACE is a non-list sexp. Or what the manual calls a SUBEXP-HIGHLIGHTER, i.e., a list of the form: ,---- | (0 '(face cm-addition-face read-only t)))) t) `---- However, what confused me was that the manual says: (info "(elisp) Search-based Fontification") ,---- | `(MATCHER . FACESPEC)' | [...] | 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. `---- which to me means that it should be possible to have: (MATCHER . (face FACE PROP1 VAL1)) (save for the quote, but I originally tried both with and without). which, as you point out, isn't possible. So either I'm reading the manual wrong, or I should report a bug in the manual. :-) -- Joost Kremers joostkremers@fastmail.fm Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9)