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

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

Re: font-lock-add-keywords problem


From: Johan Bockgård
Subject: Re: font-lock-add-keywords problem
Date: Sun, 05 Mar 2006 19:48:19 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Stefan Bienert <stefanbienert@web.de> writes:

> I have a problem with the adding of own types to the c-mode in
> emacs. I have used:
>
> (font-lock-add-keywords
>  'c-mode
>  '(("\\<\\(Shortint\\)\\>" 1 font-lock-type-face t)))
                                                   
Remove the `t' ------------------------------------^

> to make emacs highlighting the type "Shortint". But now its also
> highlighted in comments /* Shortint */. What can I do to unhighlight
> it in comments?

,----[ C-h v font-lock-keywords RET ]
| [...]
|
| MATCH-HIGHLIGHT should be of the form:
| 
|  (SUBEXP FACENAME [OVERRIDE [LAXMATCH]])
|
| [...]
|
| If OVERRIDE is t, existing fontification can be overwritten. [...]
`----

-- 
Johan Bockgård


reply via email to

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