all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: font-lock regexp for complementary keywords
Date: Tue, 25 Jul 2006 10:15:48 -0600	[thread overview]
Message-ID: <ea5g4j$uk5$1@sea.gmane.org> (raw)
In-Reply-To: <87k663nduk.fsf@hans.local.net>

Dieter Wilhelm wrote:
> 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 ...

Why are you grouping and highlighting either "/fil" or the last letter?

> 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.

"/fil\\(n\\(a\\(me?\\)?\\)?\\)?\\>" 0 font-lock...

-- 
Kevin

  reply	other threads:[~2006-07-25 16:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-24 16:53 font-lock regexp for complementary keywords Dieter Wilhelm
2006-07-25 16:15 ` Kevin Rodgers [this message]
     [not found] ` <mailman.4451.1153844221.9609.help-gnu-emacs@gnu.org>
2006-08-13 18:37   ` David Combs
2006-08-16 12:18     ` Miles Bader
     [not found] <mailman.4440.1153819115.9609.help-gnu-emacs@gnu.org>
2006-07-25 12:45 ` Johan Bockgård
2006-07-27  8:21   ` Dieter Wilhelm

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

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

  git send-email \
    --in-reply-to='ea5g4j$uk5$1@sea.gmane.org' \
    --to=ihs_4664@yahoo.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.