help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help with font locking


From: Mark P
Subject: Re: help with font locking
Date: Fri, 13 Jan 2006 00:27:01 GMT
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

Alan Mackenzie wrote:
In gnu.emacs.help Mark P <usenet@fall2005remove.fastmailcaps.fm> wrote:

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:


[ .... ]


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


In CC Mode 5.30, the new variable c++-font-lock-extra-types was
introduced to do exactly what you want.  Chances are, you've only got CC
Mode 5.28 (do M-x c-version).  In that case, download the latest version
(5.31.1) from <http://cc-mode.sourceforge.net/release.php>.  The variable
is documented on page "Font Locking Preliminaries" of the manual
distributed with the release.


Great tip, thanks! Not only does it solve my problem, it also improves the font-lock behavior quite generally.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]