all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* help with font locking
@ 2006-01-12  0:20 Mark P
  2006-01-12 17:31 ` Kevin Rodgers
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Mark P @ 2006-01-12  0:20 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-01-13  0:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-12  0:20 help with font locking Mark P
2006-01-12 17:31 ` Kevin Rodgers
2006-01-12 20:06 ` Alan Mackenzie
2006-01-13  0:27   ` Mark P
     [not found] ` <mailman.847.1137087711.26925.help-gnu-emacs@gnu.org>
2006-01-12 20:28   ` Mark P

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.