From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: font lock woes Date: Tue, 05 Mar 2013 21:43:59 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1362537866 27945 80.91.229.3 (6 Mar 2013 02:44:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 Mar 2013 02:44:26 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Mar 06 03:44:46 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 1UD4LU-0004eX-BO for geh-help-gnu-emacs@m.gmane.org; Wed, 06 Mar 2013 03:44:44 +0100 Original-Received: from localhost ([::1]:41923 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UD4L8-0002a1-Pr for geh-help-gnu-emacs@m.gmane.org; Tue, 05 Mar 2013 21:44:22 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:43672) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UD4Ky-0002Zw-8N for help-gnu-emacs@gnu.org; Tue, 05 Mar 2013 21:44:13 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UD4Kx-0000qC-5i for help-gnu-emacs@gnu.org; Tue, 05 Mar 2013 21:44:12 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:41690) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UD4Kw-0000q0-Uz for help-gnu-emacs@gnu.org; Tue, 05 Mar 2013 21:44:11 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UD4LG-0004Wp-UH for help-gnu-emacs@gnu.org; Wed, 06 Mar 2013 03:44:30 +0100 Original-Received: from 69-196-187-203.dsl.teksavvy.com ([69.196.187.203]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 06 Mar 2013 03:44:30 +0100 Original-Received: from monnier by 69-196-187-203.dsl.teksavvy.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 06 Mar 2013 03:44:30 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 28 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 69-196-187-203.dsl.teksavvy.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:YRJq/nEtiichxvgfYLAI3vkqxlw= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 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:89379 Archived-At: > ,---- > | (font-lock-add-keywords > | nil `((,(regexp-quote "{++") . '(face cm-addition-face read-only t))) t) > `---- > made fontification of the relevant strings stop working. > After changing it to: > ,---- > | (font-lock-add-keywords > | nil `((,(regexp-quote "{++") 0 '(face cm-addition-face read-only t)) > `---- > fontification worked again. 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. Stefan