From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: FCC Newsgroups: gmane.emacs.help Subject: Re: keyword highlighting Date: Fri, 10 Sep 2004 17:13:33 +0200 Organization: UPC Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1094829322 945 80.91.224.253 (10 Sep 2004 15:15:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 10 Sep 2004 15:15:22 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 10 17:15:05 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C5n7A-0002t1-00 for ; Fri, 10 Sep 2004 17:15:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C5nCX-0001gs-J9 for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Sep 2004 11:20:37 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!news.rediris.es!news.cesca.es!news.upc.es!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-NNTP-Posting-Host: adca05.upc.es Original-X-Trace: defalla.upc.es 1094829221 29831 147.83.51.18 (10 Sep 2004 15:13:41 GMT) Original-X-Complaints-To: newsmngr@upc.es Original-NNTP-Posting-Date: 10 Sep 2004 15:13:41 GMT User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040714 X-Accept-Language: en-us, en, es-es, tr In-Reply-To: Original-Xref: shelby.stanford.edu gnu.emacs.help:125246 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 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 Xref: main.gmane.org gmane.emacs.help:20600 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:20600 Dan Boitnott articulated on 9/9/2004 11:26 PM: > I'm adding keyword highlighting to a new major mode I'm writing. I'm > having trouble getting one type to work. I'd like to set any line that > begins with "vms " to font-lock-constant face. I thought something > like this should work: > > ("^VMS.*$" . font-lock-constant-face) > > But the lines don't highlight at all. If I do: > > ("^VMS" . font-lock-constant-face) > > the "VMS" is colored but the rest of the line isn't. If I do this: > > ("^VMS...." . font-lock-constant-face) > > the "VMS" and four characters after are colored. This suggests the > caret and the period are working as expected. Is the engine matching > un-greedily? Any help would be appriciated. > > Thanks, > Dan > > > I have just tested, ("\\(^VMS.*$\\)" 1 font-lock-warning-face prepend) is working fine (all the line becomes red). may be it is the parantheses that you lack in yours. -- FCC. === There was never a genius without a tincture of madness. -Aristotle.