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

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

Re: How to enable font lock for functions called by other functions


From: Nikolaj Schumacher
Subject: Re: How to enable font lock for functions called by other functions
Date: Mon, 11 Aug 2008 22:03:58 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2.50 (darwin)

doyoucy@gmail.com wrote:

> For example:
> void foo1()
> {
>     foo2();
> }
>
> The function foo1 has font-lock enabled and function foo2 is just
> plain text.
> So, is there any options to enable the font lock for inside fuunctions
> (foo2)?

You can use the following in your `c-mode-common-hook', though I'm sure
it breaks down in same cases.

(font-lock-add-keywords
   nil `(("\\([[:alpha:]_][[:alnum:]_]*\\)("  1 font-lock-function-name-face)))


regards,
Nikolaj Schumacher




reply via email to

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