[Top][All Lists]

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

Re: Lisp indentation.

From: Lute Kamstra
Subject: Re: Lisp indentation.
Date: Sun, 13 Mar 2005 14:23:15 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:


> 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.

Actually, there is a problem with using declare to specify
indentation.  Some macro's like `eval-when-compile' are defined upon
startup, because loadup.el loads the file in which they are defined.
If (put ... 'lisp-indent-function ...) is used to specify indentation,
then that is executed during startup as well.  However, if (declare
(indent ...)) is used to specify indentation, then the macro is
defined during startup, but its lisp-indent-property will not be set.

[I guess, this is why there is a (put 'when 'lisp-indent-function 1)
in lisp-mode.el, even though the definition of when in subr.el uses
(declare (indent 1)).]

(declare (debug ...)) has the same problem wrt the edebug-form-spec

This should probably be fixed somehow, or else documented.


reply via email to

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