help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: keyword highlighting


From: FCC
Subject: Re: keyword highlighting
Date: Fri, 10 Sep 2004 17:13:33 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040714

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]