From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nikolaj Schumacher Newsgroups: gmane.emacs.help Subject: Re: How to enable font lock for functions called by other functions Date: Mon, 11 Aug 2008 22:03:58 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1218485586 32560 80.91.229.12 (11 Aug 2008 20:13:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Aug 2008 20:13:06 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: doyoucy@gmail.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Aug 11 22:13:58 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KSdlM-0005jr-Ew for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Aug 2008 22:13:08 +0200 Original-Received: from localhost ([127.0.0.1]:47840 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KSdkQ-0006MF-5H for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Aug 2008 16:12:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KSdcZ-0004um-CT for help-gnu-emacs@gnu.org; Mon, 11 Aug 2008 16:04:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KSdcX-0004sc-NS for help-gnu-emacs@gnu.org; Mon, 11 Aug 2008 16:04:02 -0400 Original-Received: from [199.232.76.173] (port=49624 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KSdcW-0004sR-NB for help-gnu-emacs@gnu.org; Mon, 11 Aug 2008 16:04:01 -0400 Original-Received: from fmmailgate02.web.de ([217.72.192.227]:44948) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KSdcW-0004ba-Fh for help-gnu-emacs@gnu.org; Mon, 11 Aug 2008 16:04:00 -0400 Original-Received: from smtp07.web.de (fmsmtp07.dlan.cinetic.de [172.20.5.215]) by fmmailgate02.web.de (Postfix) with ESMTP id EFABBE886E10; Mon, 11 Aug 2008 22:03:58 +0200 (CEST) Original-Received: from [77.135.44.156] (helo=thursday) by smtp07.web.de with asmtp (WEB.DE 4.109 #226) id 1KSdcU-0007l9-00; Mon, 11 Aug 2008 22:03:58 +0200 In-Reply-To: (doyoucy@gmail.com's message of "Mon\, 11 Aug 2008 03\:13\:50 -0700 \(PDT\)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2.50 (darwin) X-Sender: n_schumacher@web.de X-Provags-ID: V01U2FsdGVkX1/T1yeamtZIKwW6bT74ZwQ68mvsojqPrU67igQX gd1AEUC0ITn0Rn9Y0oY/VTTKUtO8yZ6vF7+vpUESEFUVlxkWiQ Lr+0+ujse94trnxFvzAg== X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:56483 Archived-At: 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