From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mads Jensen Newsgroups: gmane.emacs.help Subject: font-locking regexps ? Date: 26 Sep 2005 21:11:24 +0200 Organization: TDC Totalloesninger Message-ID: <874q8763vn.fsf@madamex.madamex.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1127762268 5895 80.91.229.2 (26 Sep 2005 19:17:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 26 Sep 2005 19:17:48 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 26 21:17:47 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EJyRe-0000nx-1X for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Sep 2005 21:15:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EJyRd-0004pZ-DO for geh-help-gnu-emacs@m.gmane.org; Mon, 26 Sep 2005 15:15:21 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!news.glorb.com!news.tele.dk!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 Original-Lines: 39 Original-NNTP-Posting-Host: 80.197.19.230 Original-X-Trace: 1127761886 dread16.news.tele.dk 87581 80.197.19.230:4564 Original-X-Complaints-To: abuse@post.tele.dk Original-Xref: shelby.stanford.edu gnu.emacs.help:134160 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:29728 Archived-At: Hi NG, I am trying to write some code for coloring some regexps, but cannot really make it work. Since regexps seem to be working a little bit differently (| = \\| in emacs lisp and so on), I'd like some help. I am trying to get some items in a list colored: (codes-inducks (eval-when-compile (list '("[YZ]. [0-9]{2}-[0-9]{2}-[0-9]" "I .{9}" "F .{8}" "[DH] [0-9-]{6}" "D 20[0-9-]{6}" "W .{10}"))))) and I'm using these code for coloring it: (setq inducks-keywords (list (cons keywords-inducks 'inducks-keyword-face) (cons codes-inducks 'inducks-code-face))) But it's not working. Please just point me to a major mode, that uses this. Someone refered me to sql.el in an earlier thread, which helped me get some of the font-lock part to work in a mode, I'm working on. -- Mads Jensen - mail sent to address ends in /dev/null s/spam/madsj for emailing me gpg: 7E775BDA It is impossible to make anything foolproof because fools are so ingenious.