From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: ken Newsgroups: gmane.emacs.help Subject: Re: keyword highlighting Date: Fri, 10 Sep 2004 08:43:15 -0400 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <4141A163.5090601@speakeasy.net> References: Reply-To: gebser@speakeasy.net NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1094820398 8885 80.91.224.253 (10 Sep 2004 12:46:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 10 Sep 2004 12:46:38 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 10 14:46:08 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 1C5kn2-0007LA-00 for ; Fri, 10 Sep 2004 14:46:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C5ksP-0001ch-GE for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Sep 2004 08:51:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C5ksG-0001cZ-R4 for help-gnu-emacs@gnu.org; Fri, 10 Sep 2004 08:51:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C5ksG-0001cN-5v for Help-gnu-emacs@gnu.org; Fri, 10 Sep 2004 08:51:32 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C5ksG-0001cK-31 for Help-gnu-emacs@gnu.org; Fri, 10 Sep 2004 08:51:32 -0400 Original-Received: from [216.254.0.205] (helo=mail5.speakeasy.net) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1C5kmS-0007MA-SQ for Help-gnu-emacs@gnu.org; Fri, 10 Sep 2004 08:45:33 -0400 Original-Received: (qmail 8546 invoked from network); 10 Sep 2004 12:45:30 -0000 Original-Received: from dsl093-011-017.cle1.dsl.speakeasy.net (HELO [192.168.0.100]) (cousin@[66.93.11.17]) (envelope-sender ) by mail5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 10 Sep 2004 12:45:30 -0000 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040831 X-Accept-Language: en-us, en, de, ru, fr-fr Original-To: Dan Boitnott , Help-gnu-emacs@gnu.org In-Reply-To: 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:20592 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:20592 Dan Boitnott wrote: > 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 Well, you're doing the right thing by playing around with it. You would do well to read up on regular expressions. (But then so would I. B) ) I'm thinking you want something like "VMS .*$" hth, ken