unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Mads Jensen <spam@raptus.dk>
Subject: font-locking regexps ?
Date: 26 Sep 2005 21:11:24 +0200	[thread overview]
Message-ID: <874q8763vn.fsf@madamex.madamex.dk> (raw)

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:

<code>
        (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}")))))
</code>

and I'm using these code for coloring it:

<code>
    (setq inducks-keywords
	  (list (cons keywords-inducks 'inducks-keyword-face)
                (cons codes-inducks 'inducks-code-face)))
</code>

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.

             reply	other threads:[~2005-09-26 19:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-26 19:11 Mads Jensen [this message]
2005-09-26 21:33 ` font-locking regexps ? Kevin Rodgers

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=874q8763vn.fsf@madamex.madamex.dk \
    --to=spam@raptus.dk \
    /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).