unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* font-locking regexps ?
@ 2005-09-26 19:11 Mads Jensen
  2005-09-26 21:33 ` Kevin Rodgers
  0 siblings, 1 reply; 2+ messages in thread
From: Mads Jensen @ 2005-09-26 19:11 UTC (permalink / 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-09-26 21:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-26 19:11 font-locking regexps ? Mads Jensen
2005-09-26 21:33 ` Kevin Rodgers

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).