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

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

Re: how is emacs lisp syntax colored in emacs-lisp-mode?


From: Nikolaj Schumacher
Subject: Re: how is emacs lisp syntax colored in emacs-lisp-mode?
Date: Tue, 10 Mar 2009 21:06:16 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (darwin)

Xah Lee <xahlee@gmail.com> wrote:

> for example, these keywords would be colored purple by default:
>
>  defun, lambda, while, if, progn, save-restriction, ...
>
> while the following built-in keywords are uncolored (black):
> narrow-to-region, mapc, goto-char, point-min, search-forward, car,
> nil, replace-match ... etc.

Those aren't emacs lisp "keywords".  Those are ordinary functions.  They
are called "built-in", because they happen to be written in C instead of
Lisp.  But that is hardly relevant, and can even change over time.

defun, lambda and while are not functions, but special forms.  They are
part of the language.

save-*, with-* and others are macros based on special forms.  They
aren't keywords either, but probably colored (and indented) differently
for convenience.


If you want to highlight symbols that are "shipped" with Emacs (to
whatever extend) you'll need to add a matcher function to the font lock
keywords that checks whether, and in which files, symbols have been defined


> is there a principle of how the keywords are colored?


regards,
Nikolaj Schumacher




reply via email to

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