From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bojohan+news@dd.chalmers.se (Johan =?utf-8?Q?Bockg=C3=A5rd?=) Newsgroups: gmane.emacs.help Subject: Re: Adding a colon as a word boundary for syntax highlighting Date: Mon, 18 Feb 2008 13:58:33 +0100 Organization: Chalmers University of Technology, Sweden Message-ID: References: <13ri26n4913br9a@news.supernews.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1203342047 321 80.91.229.12 (18 Feb 2008 13:40:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Feb 2008 13:40:47 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 18 14:41:11 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JR6Ez-0001Ce-AN for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Feb 2008 14:41:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JR6EU-0002GV-QC for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Feb 2008 08:40:34 -0500 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!news.glorb.com!news.solace.miun.se!news.solace.miun.se!gide.ita.chalmers.se!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 31 Original-NNTP-Posting-Host: remote2.student.chalmers.se Original-X-Trace: gide.ita.chalmers.se 1203339513 18701 129.16.29.80 (18 Feb 2008 12:58:33 GMT) Original-X-Complaints-To: usenet@gide.ita.chalmers.se Original-NNTP-Posting-Date: Mon, 18 Feb 2008 12:58:33 +0000 (UTC) Mail-Copies-To: never User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.50 (gnu/linux) Cancel-Lock: sha1:JyT/eAQDCO7/qxIAPBTnzm56C9g= Original-Xref: shelby.stanford.edu gnu.emacs.help:156267 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:51639 Archived-At: Tim Johnson writes: > 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. That doesn't make sense. > 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. Note that font-lock can use a different syntax table than the mode's ordinary syntax table. > 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. M-x re-builder or regex-tool.el -- Johan Bockgård