[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
font-lock regexp for complementary keywords
From: |
Dieter Wilhelm |
Subject: |
font-lock regexp for complementary keywords |
Date: |
Mon, 24 Jul 2006 18:53:55 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Hi
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
as well. The only idea I got so far is to do it in 5 separate
font-lock statements:
\\(/fil\\) 1 font-lock...
/fil\\(n\\) 1 fon...
/filn\\(a\\) 1 ...
/filna\\(m\\) 1 ...
/filnam\\(e\\) 1 ...
Very ugly and inefficient, isn't it?
Originally I thought that something like this
/fil\\(n\\|na\\|nam\\|name\\)
would work but rexexp-bulider doesn't show any matches for the
complementing alternatives.
--
Best wishes
H. Dieter Wilhelm
Darmstadt, Germany
- font-lock regexp for complementary keywords,
Dieter Wilhelm <=