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: Enhancing font-locking in emacs-lisp-mode Date: Fri, 06 Jun 2008 00:02:27 +0200 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1212703431 14278 80.91.229.12 (5 Jun 2008 22:03:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Jun 2008 22:03:51 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: =?utf-8?Q?Nordl=C3=B6w?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 06 00:04:33 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 1K4NZP-0006aS-S5 for geh-help-gnu-emacs@m.gmane.org; Fri, 06 Jun 2008 00:04:32 +0200 Original-Received: from localhost ([127.0.0.1]:36283 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K4NYd-0003nt-Dq for geh-help-gnu-emacs@m.gmane.org; Thu, 05 Jun 2008 18:03:43 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K4NY1-0003gB-EC for help-gnu-emacs@gnu.org; Thu, 05 Jun 2008 18:03:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K4NXz-0003fx-T1 for help-gnu-emacs@gnu.org; Thu, 05 Jun 2008 18:03:05 -0400 Original-Received: from [199.232.76.173] (port=38367 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K4NXz-0003fu-OS for help-gnu-emacs@gnu.org; Thu, 05 Jun 2008 18:03:03 -0400 Original-Received: from fmmailgate03.web.de ([217.72.192.234]:60107) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K4NXy-0003y1-Vp for help-gnu-emacs@gnu.org; Thu, 05 Jun 2008 18:03:03 -0400 Original-Received: from smtp06.web.de (fmsmtp06.dlan.cinetic.de [172.20.5.172]) by fmmailgate03.web.de (Postfix) with ESMTP id 86E56DE7AC20; Fri, 6 Jun 2008 00:02:28 +0200 (CEST) Original-Received: from [77.189.13.10] (helo=thursday) by smtp06.web.de with asmtp (WEB.DE 4.109 #226) id 1K4NXQ-0006ul-00; Fri, 06 Jun 2008 00:02:28 +0200 In-Reply-To: (=?utf-8?Q?=22Nordl=C3=B6w=22's?= message of "Thu\, 5 Jun 2008 12\:37\:28 -0700 \(PDT\)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (darwin) X-Sender: n_schumacher@web.de X-Provags-ID: V01U2FsdGVkX1+nWf0lW6J63bGpjt1jQEebHtOt/nrBGPW5BPQX ClNQuC2lSq2POZNNyc7VPWVyZs34KGX8VccdjT4teP2rMvVtlg rUHsBHD7M3MEBsQTleSg== 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:54490 Archived-At: Nordl=C3=B6w wrote: > - function name part of function calls: I guess this is hard/ > (impossible?) to get right for all cases but maybe we could somehow > reuse `functionp' in the MATCHER to better filter out the more > relevant cases? Something like this...? (font-lock-add-keywords emacs-lisp-mode (eval-when-compile '(("\\_<\\(?:\\s_\\|\\sw\\)+\\_>" (0 (let ((symbol (intern (match-string 0)))) (cond ((macrop symbol) 'font-lock-macro-name-face) ((fboundp symbol) 'font-lock-function-name-face) ((or (boundp symbol) (facep symbol)) 'font-lock-variable-name-face)))))))) (font-lock-macro-name-face is a face defined by me.) Let me know when you make any progress. I'm very interested. :) regards, Nikolaj Schumacher