From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark P Newsgroups: gmane.emacs.help Subject: help with font locking Date: Thu, 12 Jan 2006 00:20:14 GMT Organization: SBC http://yahoo.sbc.com Message-ID: <2hhxf.91$Jd.25@newssvr25.news.prodigy.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1137025673 24198 80.91.229.2 (12 Jan 2006 00:27:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 12 Jan 2006 00:27:53 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 12 01:27:51 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EwqJW-0000F3-Jh for geh-help-gnu-emacs@m.gmane.org; Thu, 12 Jan 2006 01:27:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EwqLZ-0001Gx-Q7 for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Jan 2006 19:29:45 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon06.news.prodigy.com!prodigy.net!newsmst01b.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr25.news.prodigy.net.POSTED!5a60e384!not-for-mail User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041206 Thunderbird/1.0 Mnenhy/0.7.2.0 X-Accept-Language: en-us, en Original-Newsgroups: gnu.emacs.help,comp.emacs Original-Lines: 29 Original-NNTP-Posting-Host: 64.169.83.211 Original-X-Complaints-To: abuse@prodigy.net Original-X-Trace: newssvr25.news.prodigy.net 1137025214 ST000 64.169.83.211 (Wed, 11 Jan 2006 19:20:14 EST) Original-NNTP-Posting-Date: Wed, 11 Jan 2006 19:20:14 EST X-UserInfo1: Q[R_@SRDTRREB^LXBBHZOUL@USXB@DTMNHWB_EYLJZ]BGIELLNTC@AWZWDXZXQ[K\FFSKCVM@F_N_DOBWVWG__LG@VVOIPLIGX\\BU_B@\P\PFX\B[APHTWAHDCKJF^NHD[YJAZMCY_CWG[SX\Y]^KC\HSZRWSWKGAY_PC[BQ[BXAS\F\\@DMTLFZFUE@\VL Original-Xref: shelby.stanford.edu gnu.emacs.help:136982 comp.emacs:90872 Original-To: help-gnu-emacs@gnu.org 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:32596 Archived-At: I'm trying to edit my .emacs file so that in c++-mode a frequently used user-defined type "Coord" is highlighted like any built-in type (int, bool, etc.) I searched around for a while but found only very limited information. The best I could produce was the following: ;; customize font-locking (font-lock-add-keywords 'c++-mode '(("\\<\\(Coord\\)" 1 font-lock-type-face) ) ) This sort of works. In a statement like: Coord fcn (Coord x); "Coord" is highlighted twice, but neither "fcn" nor "x" is. In a normal statement like: int fcn (int x) "int" is highlighted as are "fcn" and "x". Can anyone suggest a way to make the behavior for Coord match that for int. Any links to detail documentation on how this works would also be appreciated. (For example, why all the quotes and slashes in the .emacs code?) Thanks, Mark