From: ken <gebser@speakeasy.net>
Subject: Re: keyword highlighting
Date: Fri, 10 Sep 2004 08:43:15 -0400 [thread overview]
Message-ID: <4141A163.5090601@speakeasy.net> (raw)
In-Reply-To: <F40E192E-02A6-11D9-AF2E-000D932E24AA@fastmail.fm>
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
next prev parent reply other threads:[~2004-09-10 12:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-09 21:26 keyword highlighting Dan Boitnott
2004-09-10 12:43 ` ken [this message]
[not found] <mailman.2205.1094765546.1998.help-gnu-emacs@gnu.org>
2004-09-10 15:13 ` FCC
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=4141A163.5090601@speakeasy.net \
--to=gebser@speakeasy.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).