emacs-devel
[Top][All Lists]
Advanced

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

Re: Lisp indentation.


From: Stefan Monnier
Subject: Re: Lisp indentation.
Date: Thu, 10 Mar 2005 14:43:34 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> In about 25% of the cases the lisp-indent-hook property is used to
> specify the desired indentation and in the remaining 75% of the cases,
> the lisp-indent-function property is used.  Is the second preferred?
> (The docsting of the function lisp-indent-function suggest this.)
> Should occurrences of lisp-indent-hook be renamed to
> lisp-indent-function?

Yes, although there is no urgency.

> In most cases the indentation property is put on the symbol at the
> place the symbol is defined.  Symbols that are defined in C get their
> indentation property in lisp/emacs-lisp/lisp-mode.el.  There are
> however a few symbols that are defined in lisp elsewhere that get
> their lisp-indent-function property set in lisp-mode.el.  For example
> save-selected-window, save-match-data, and with-current-buffer.  Is
> there some policy wrt the place where the indentation property should
> be set?

I'd say they should be set in the `declare' part of the definition of
the macro.  See the definition of `when' or `unless' for examples.
Unless it's common to edit code that uses the macro while the macro itself
is not loaded, in which case it might be worthwhile to put the `put' in some
other file like lisp-mode.el.


        Stefan




reply via email to

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