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.