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

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

Re: font-lock regexp for complementary keywords


From: Johan Bockgård
Subject: Re: font-lock regexp for complementary keywords
Date: Tue, 25 Jul 2006 14:45:37 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

Dieter Wilhelm <dieter@duenenhof-wilhelm.de> writes:

> I'd like to fontify Ansys keywords. The solver accepts unique short
> forms of the command keywords, the rest is ignored. For example the
> uniqe part of `/filname' is `/fil' and I'd like to fontify
>
> /fil and
> /filn and
> /filna and
> /filnam and
> /filname and

(regexp-opt
 '("fil"
   "filn"
   "filna"
   "filnam"
   "filname"))

=>

"fil\\(?:n\\(?:a\\(?:me?\\)?\\)?\\)?"

-- 
Johan Bockgård


reply via email to

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