emacs-devel
[Top][All Lists]
Advanced

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





reply via email to

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