From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Syntax highlighting keywords starting with # Date: Thu, 03 Nov 2005 11:12:44 -0500 Organization: Bell Sympatico Message-ID: <87hdatyale.fsf-monnier+gnu.emacs.help@gnu.org> References: <1131019860.252451.281450@g44g2000cwa.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1131035008 27229 80.91.229.2 (3 Nov 2005 16:23:28 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 3 Nov 2005 16:23:28 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 03 17:23:20 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EXhmj-0004vM-Eh for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Nov 2005 17:17:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EXhmi-00007r-7j for geh-help-gnu-emacs@m.gmane.org; Thu, 03 Nov 2005 11:17:52 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:dwt3TT+V2ay7FEM+kTfp6LpNPKA= Original-Lines: 16 Original-NNTP-Posting-Host: 65.92.243.185 Original-X-Complaints-To: abuse@sympatico.ca Original-X-Trace: news20.bellglobal.com 1131034367 65.92.243.185 (Thu, 03 Nov 2005 11:12:47 EST) Original-NNTP-Posting-Date: Thu, 03 Nov 2005 11:12:47 EST Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.news.ucla.edu!usenet01.sei.cmu.edu!news.cis.ohio-state.edu!malgudi.oar.net!news.glorb.com!news.louisville.edu!tor-nx1!webster!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Original-Xref: shelby.stanford.edu gnu.emacs.help:135195 Original-To: help-gnu-emacs@gnu.org 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:30786 Archived-At: > How do I do that? I have a script language where all the keywords start > with #. I would like to highlight these. The regexp #[A-Z] does not > work. The regexp [R#][A-Z]* will highlight "words" like RA, RAB, RZZ > etc, but not #A or anything else starting with #. > This does not work: > (defconst psc-font-lock-keywords > (list > '("\\<[#R][A-Z]*\\>" . font-lock-builtin-face) > '("\\('\\w*'\\)" . font-lock-variable-name-face)) No wonder: this only defines a variable. Where is this variable used? Stefan