unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Tim Johnson <tim@johnsons-web.com>
To: help-gnu-emacs@gnu.org
Subject: Adding a colon as a word boundary for syntax highlighting
Date: Sun, 17 Feb 2008 19:27:03 -0900	[thread overview]
Message-ID: <13ri26n4913br9a@news.supernews.com> (raw)

Hi:
I'm using the following regex subexpression:
"\\<\\("
As the left-hand word boundary for syntax highlighting in
a lisp-style programming language.

"\\(" adds the opening parenthesis as a word boundary.

I would like to add the colon (':') as an additional word
boundary character.
The subexpressions:
"\\<\\(:" and "\\<\\(\\:" don't seem to work.
In addition I have the following entry:
(?: . "w") to the syntax table. 
Could someone advise me on how to make this work correctly.

On a related note, I believe that there is an emacs add-on that
allows the user to test elisp regexes, but for the life of me,
I can't remember where to find it.
TIA
Tim


             reply	other threads:[~2008-02-18  4:27 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-18  4:27 Tim Johnson [this message]
2008-02-18 12:58 ` Adding a colon as a word boundary for syntax highlighting Johan Bockgård
2008-02-18 16:00   ` Tim Johnson
2008-02-18 16:08 ` Stefan Monnier
2008-02-18 19:23   ` Tim Johnson
2008-02-20 19:41     ` Stefan Monnier
2008-02-20 20:37       ` Tim Johnson

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=13ri26n4913br9a@news.supernews.com \
    --to=tim@johnsons-web.com \
    --cc=help-gnu-emacs@gnu.org \
    /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).