unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: FCC <fcc509@netscape.net>
Subject: Re: keyword highlighting
Date: Fri, 10 Sep 2004 17:13:33 +0200	[thread overview]
Message-ID: <chsgb5$t47$1@defalla.upc.es> (raw)
In-Reply-To: <mailman.2205.1094765546.1998.help-gnu-emacs@gnu.org>

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	other threads:[~2004-09-10 15:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.2205.1094765546.1998.help-gnu-emacs@gnu.org>
2004-09-10 15:13 ` FCC [this message]
2004-09-09 21:26 keyword highlighting Dan Boitnott
2004-09-10 12:43 ` ken

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='chsgb5$t47$1@defalla.upc.es' \
    --to=fcc509@netscape.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).