[slime-devel] cl-indent lossage

Helmut Eller e9626484 at stud3.tuwien.ac.at
Fri Oct 29 17:21:37 UTC 2004


Lynn Quam <quam at ai.sri.com> writes:

> Was it intentional that the version of cl-indent.el in SLIME
> changed the indentation for the LOOP macro?  In particular
> cl-indent in SLIME now does this indentation:
>
> (loop for x in l
>    for y for = (foo x)
>    do (mumble x y))

This wasn't our change; it's a change in CVS Emacs.  According to
ChangeLogs, the LOOP indentation code in CVS Emacs was changed in
March 2002 by Gerd Moellmann.  It seems that the intention was that
loops should be indented as:

 (loop 
    for x in l
    for y = (foo x) do
      (mumble x y))

>
> whereas cl-indent in EMACS does this indentation:
>
> (loop for x in l
>       for y for = (foo x)
>       do (mumble x y))
>
> I much prefer the EMACS indentation.

I prefer this style too.  I have 

  (setq lisp-simple-loop-indentation 1)
  (setq lisp-loop-keyword-indentation 6)
  (setq lisp-loop-forms-indentation 6)

in my .emacs.  With this settings most code gets indented as before.
Only stuff like

  (loop
   for x = ...)

i.e no clause in the first line, is now indented as:

  (loop
	for x = ...)

No big loss, because this style is ugly anyway.

Helmut.




More information about the slime-devel mailing list