help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

font-locking regexps ?


From: Mads Jensen
Subject: font-locking regexps ?
Date: 26 Sep 2005 21:11:24 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

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 via email to

[Prev in Thread] Current Thread [Next in Thread]