From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim Johnson Newsgroups: gmane.emacs.help Subject: Re: Regex Expression for syntax highlight between delimiters Date: Sun, 12 Feb 2006 09:45:02 -0900 Message-ID: <20060212184502.GE1767@johnsons-web.com> References: <20060212054057.GD1767@johnsons-web.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1139769464 19802 80.91.229.2 (12 Feb 2006 18:37:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 12 Feb 2006 18:37:44 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Feb 12 19:37:40 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F8M6J-0006EU-40 for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Feb 2006 19:37:35 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F8M6I-0002uV-7i for geh-help-gnu-emacs@m.gmane.org; Sun, 12 Feb 2006 13:37:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F8M52-0001Zu-Iw for help-gnu-emacs@gnu.org; Sun, 12 Feb 2006 13:36:16 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F8M4y-0001VP-JZ for help-gnu-emacs@gnu.org; Sun, 12 Feb 2006 13:36:13 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F8M4y-0001UP-9D for help-gnu-emacs@gnu.org; Sun, 12 Feb 2006 13:36:12 -0500 Original-Received: from [208.218.214.44] (helo=ns3.cniweb.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1F8M9F-0003TQ-BL for help-gnu-emacs@gnu.org; Sun, 12 Feb 2006 13:40:37 -0500 Original-Received: from linus.johnson.com (rdbck-static-445.palmer.mtaonline.net [64.4.232.191]) by ns3.cniweb.net (8.13.5/8.13.5) with ESMTP id k1CIZ41u010890 for ; Sun, 12 Feb 2006 13:35:05 -0500 (EST) Original-Received: from linus.johnson.com (localhost.johnson.com [127.0.0.1]) by linus.johnson.com (8.12.8/8.12.8) with ESMTP id k1CIj2OV024620 for ; Sun, 12 Feb 2006 09:45:03 -0900 Original-Received: (from tim@localhost) by linus.johnson.com (8.12.8/8.12.8/Submit) id k1CIj2CC024618 for help-gnu-emacs@gnu.org; Sun, 12 Feb 2006 09:45:02 -0900 Original-To: help-gnu-emacs@gnu.org Mail-Followup-To: Tim Johnson , help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: <20060212054057.GD1767@johnsons-web.com> User-Agent: Mutt/1.4.2.1i 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:33164 Archived-At: * Tim Johnson [060211 22:14]: > Hello: > The following form is used to provide syntax highlighting for > a 'lisp variant. The regex expression for 'font-lock-string-face > doesn't work. The other forms do work as expected. > (cond (running-xemacs) ;; Xemacs doesn't have 'font-lock-add-keywords > (t > (make-local-variable 'lisp-font-lock-keywords-tj) > (defvar newlisp-font-lock-keywords-tj ;; faces defined in 'extra-faces > (list > (list tj-newlisp-user-keywords '1 'font-lock-user-keyword-face) > (list tj-newlisp-user-lib-keywords '1 'font-lock-user-lib-face) > (list tj-newlisp-constant-keywords '1 'font-lock-constant-face) > '("\\[text\\][^\"]*[.]*[^\"]*\\[/text\\]" 1 font-lock-string-face t) ;; This one doesn't work > ) "Additional keywords and groups for lisp-mode"))) > ;; ....... > > The regex is meant to highlight the delimiters "[text]" & "[/text]" and > everything between (multi-line string literal). The regex itself was tested with re-builder, seems > to work there. > > Can anyone tell me what else I need to do here? Okay. I fixed this one. [^#]\\(\\[text\\][^{}]*\\[/text\\]\\) is the regex that I need. But comments are still welcome... tim -- Tim Johnson http://www.alaska-internet-solutions.com