[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Incorrect indentation after :name
From: |
Lawrence Mitchell |
Subject: |
Re: Incorrect indentation after :name |
Date: |
Thu, 07 Jul 2005 22:47:48 +0100 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) |
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 <address@hidden>
- Re: Incorrect indentation after :name, (continued)
- Re: Incorrect indentation after :name, David Kastrup, 2005/07/06
- Re: Incorrect indentation after :name, Stefan Monnier, 2005/07/06
- RE: Incorrect indentation after :name, Drew Adams, 2005/07/07
- Re: Incorrect indentation after :name, Lawrence Mitchell, 2005/07/07
- Re: Incorrect indentation after :name, Juanma Barranquero, 2005/07/07
- Re: Incorrect indentation after :name, Richard M. Stallman, 2005/07/08
- Re: Incorrect indentation after :name, Juanma Barranquero, 2005/07/11
- Re: Incorrect indentation after :name, David Kastrup, 2005/07/11
- Re: Incorrect indentation after :name, Juanma Barranquero, 2005/07/11
- RE: Incorrect indentation after :name, Drew Adams, 2005/07/07
- Re: Incorrect indentation after :name,
Lawrence Mitchell <=
- RE: Incorrect indentation after :name, Drew Adams, 2005/07/07
- Re: Incorrect indentation after :name, Richard M. Stallman, 2005/07/07
- Re: Incorrect indentation after :name, Richard M. Stallman, 2005/07/07