all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: bufie <bufie@spamneggs.com>
To: help-gnu-emacs@gnu.org
Subject: please help with font-lock-add-keywords
Date: Wed, 30 Dec 2009 18:06:19 -0700	[thread overview]
Message-ID: <hhgteb$uki$1@news.eternal-september.org> (raw)

(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


             reply	other threads:[~2009-12-31  1:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-31  1:06 bufie [this message]
2009-12-31 13:08 ` please help with font-lock-add-keywords 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

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='hhgteb$uki$1@news.eternal-september.org' \
    --to=bufie@spamneggs.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.