From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bufie Newsgroups: gmane.emacs.help Subject: please help with font-lock-add-keywords Date: Wed, 30 Dec 2009 18:06:19 -0700 Organization: A noiseless patient Spider Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1262254346 23188 80.91.229.12 (31 Dec 2009 10:12:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 31 Dec 2009 10:12:26 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 31 11:12:19 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NQI0x-0001lf-EF for geh-help-gnu-emacs@m.gmane.org; Thu, 31 Dec 2009 11:12:19 +0100 Original-Received: from localhost ([127.0.0.1]:48460 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NQI0x-0005o3-Fy for geh-help-gnu-emacs@m.gmane.org; Thu, 31 Dec 2009 05:12:19 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!newsserver.news.garr.it!kanaga.switch.ch!switch.ch!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.straub-nv.de!feeder.eternal-september.org!eternal-september.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 39 Original-X-Trace: news.eternal-september.org U2FsdGVkX1/uTUB+WIGQmgWGIBJmOCpFGToQ4D11mFdDwQYTs5qjpKd3vaD40rlEEx45bzU1w7zYrr7FjJ16DTpqV6K8URzd6a5yH5aCpO8EwXvLC3FlX3q49/7Caan2Wm2GS6XyhHMn1gH5P1Fc7A== Original-X-Complaints-To: abuse@eternal-september.org Original-NNTP-Posting-Date: Thu, 31 Dec 2009 01:06:19 +0000 (UTC) X-Auth-Sender: U2FsdGVkX19IFMBcfzVknQcE5WC3Z9+DykGLAcnB4Tc= Cancel-Lock: sha1:asWlNxOLR0sih85ipCiqZAtVO80= User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) Original-Xref: news.stanford.edu gnu.emacs.help:175894 X-Mailman-Approved-At: Thu, 31 Dec 2009 05:11:44 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:70970 Archived-At: (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