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

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

Re: Enhancing font-locking in emacs-lisp-mode


From: Nikolaj Schumacher
Subject: Re: Enhancing font-locking in emacs-lisp-mode
Date: Fri, 06 Jun 2008 00:02:27 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (darwin)

Nordlöw <per.nordlow@gmail.com> 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




reply via email to

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