[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
please help with font-lock-add-keywords
From: |
bufie |
Subject: |
please help with font-lock-add-keywords |
Date: |
Wed, 30 Dec 2009 18:06:19 -0700 |
User-agent: |
Thunderbird 2.0.0.23 (Windows/20090812) |
(originally posted to comp.emacs, but moved here since it seems more
appropriate...)
Hi all,
I'd like to fontify a whole bunch of function names for a project I'm
working on (which uses lisp mode, not emacs-lisp-mode -- for reference,
I'm using GNU emacs 23.1.1).
Almost all of the functions start with the same prefix "qbb-" so that
shouldn't be too hard (though for the examples I've just tried to use
some actual function names to get it to work). I've done a bunch of web
searching, and haven't figured out a way to make this work.
I've tried all of the following, and none of them work for me... I
don't claim to be a wizard at this stuff, but thought I had followed the
examples correctly
(font-lock-add-keywords
'lisp-mode
'(("\\<\\(qbb-create-image\\|qbb-destroy-image\\)\\>" .
font-lock-keyword-face)))
(font-lock-add-keywords
'lisp-mode
'(("\\<\\qbb-create-image\\)" 2 font-lock-keyword-face t)))
(add-hook 'lisp-mode-hook
(lambda ()
(font-lock-add-keywords
nil
'(("\\<\\(qbb-create-image\\|qbb-destroy-image\\)\\>" .
font-lock-keyword-face)))))
I'm sure this can't be as hard as I'm making it -- help, please!
Thanks in advance!
b
- please help with font-lock-add-keywords,
bufie <=