Drew Adams wrote:
> > (put 'if 'common-lisp-indent-function
> > '(nil nil &body))))
> This breaks the standard indentation of IF in lisp-mode buffers.
By standard, I mean the accepted way of indenting IF in common
lisp.
> I don't see that (with emacs -q). What are you seeing?
> I assume that you meant adding the above to lisp-mode-hook instead of
> emac-lisp-mode-hook, but either way I see this, which is also the vanilla
> indentation of IF in lisp-mode:
Well, (put 'if 'common-lisp-indent-function '(nil nil &body)) is
not mode-local, so it will affect indentation of IF in all modes
that use common-lisp-indent-function to indent.
Emacs lisp IF is (if TEST THEN &REST ELSE), while common lisp IF
is (if TEST THEN ELSE). The conventional mode of indenting IF in
Emacs lisp is:
(if test
then
else)
whereas in common lisp:
(if test
then
else)
(since only the one else-form is allowed). It is this latter
indentation that is affected by the above suggestion.
[...]
--
Lawrence Mitchell <[EMAIL PROTECTED]>
_______________________________________________
Emacs-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-devel