unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* please help with font-lock-add-keywords
@ 2009-12-31  1:06 bufie
  2009-12-31 13:08 ` Tassilo Horn
       [not found] ` <mailman.477.1262264969.18930.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: bufie @ 2009-12-31  1:06 UTC (permalink / raw)
  To: help-gnu-emacs

(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


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

end of thread, other threads:[~2010-01-07  1:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-31  1:06 please help with font-lock-add-keywords bufie
2009-12-31 13:08 ` Tassilo Horn
     [not found] ` <mailman.477.1262264969.18930.help-gnu-emacs@gnu.org>
2009-12-31 23:14   ` bufie
2010-01-07  0:39   ` David Combs
2010-01-07  1:01     ` Lennart Borgman

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