From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ralf Angeli Newsgroups: gmane.emacs.devel Subject: Re: Face specifications in font-lock-keywords. Date: Wed, 06 Apr 2005 20:48:42 +0200 Message-ID: References: <87y8bwf5px.fsf@xs4all.nl> <871x9oc9i9.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1112813510 15524 80.91.229.2 (6 Apr 2005 18:51:50 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 6 Apr 2005 18:51:50 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 06 20:51:48 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DJFby-0000Ub-On for ged-emacs-devel@m.gmane.org; Wed, 06 Apr 2005 20:50:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DJFB7-0007fS-Sf for ged-emacs-devel@m.gmane.org; Wed, 06 Apr 2005 14:23:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DJF9K-0005fR-RB for emacs-devel@gnu.org; Wed, 06 Apr 2005 14:21:13 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DJF9K-0005X4-E2 for emacs-devel@gnu.org; Wed, 06 Apr 2005 14:21:10 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1DJFci-00073M-H5 for emacs-devel@gnu.org; Wed, 06 Apr 2005 14:51:32 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1DJFZ9-0008PY-EG for emacs-devel@gnu.org; Wed, 06 Apr 2005 20:47:53 +0200 Original-Received: from dialin-212-144-207-116.arcor-ip.net ([212.144.207.116]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 06 Apr 2005 20:47:51 +0200 Original-Received: from angeli by dialin-212-144-207-116.arcor-ip.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 06 Apr 2005 20:47:51 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: emacs-devel@gnu.org Original-Lines: 37 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: dialin-212-144-207-116.arcor-ip.net User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:XLEqMEIVPdRYD2WBodBi52LFRjg= X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:35652 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35652 * Stefan Monnier (2005-04-06) writes: >>> I think (face FACE [PROP VAL]...) would be clearer. > >> AFAICS the "face FACE" part isn't even necessary; you can pass a >> property/value-only list to `font-lock-keywords' and it will work as >> well (you might have to disable global-font-lock-mode before trying >> this): > >> (progn >> (pop-to-buffer (get-buffer-create "*foo*")) >> (insert "foo") >> (setq font-lock-keywords '(("foo" 0 '(:foreground "green")))) >> (font-lock-fontify-keywords-region (point-min) (point-max))) > > It doesn't do the same. Your example only affects the `face' property, > whereas what the doc is talking about is how to set several text properties, > additionally to the `face' property (e.g. thinks like `keymap', `display' > `invisible', ...). Oh, I see. >> This is not covered in the manual and doc string yet, or am I missing >> something? > > It's probably discussed in the section talking about faces. > It's not specific to font-lock at all. In the section about faces there is a subsection about face attributes. But it doesn't mention that you can use a list of such attributes and associated values for `font-lock-keywords'. The documentation of `font-lock-keywords' could describe it, though. That is what I meant, although I confused text properties with face attributes. -- Ralf