[slime-devel] loop macro indentation

Hi I want to express my gratitude for the excellent mode. I have discovered a tiny annoyance though. It is regarding indentation of the loop construct in slime-mode. In Emacs lisp mode my example is indented like this: (loop for i from 1 to 10 do (print i)) I like the way it aligns `for' and `do' (and other keywords), but when I use slime, it is indented like this: (loop for i from 1 to 10 do (print i)) Which bothers me greatly for some reason. Is there any way I can preserve the Emacs lisp mode's way of indenting the loop construct, while running M-x slime? Thomas

* Thomas Christensen [2008-04-27 16:19+0200] writes:
Hi
I want to express my gratitude for the excellent mode. I have discovered a tiny annoyance though. It is regarding indentation of the loop construct in slime-mode.
Indentation is actually done by lisp-mode and not by slime-mode. SLIME adds some hints for macros which have &body in their arguments (by setting the common-lisp-indent-function property on those symbols). We don't override existing doesn't properties. For LOOP I have this in my .emacs: (setq lisp-simple-loop-indentation 1) (setq lisp-loop-keyword-indentation 6) (setq lisp-loop-forms-indentation 6) I'm quite happy with those settings as they work good enough for the simple cases and stop me from using too complicated LOOPism. In contrib/slime-indentation.el you can find a more ambitious indentation function which should also properly indent WHEN and IF loop clauses. This is not loaded by default. Helmut.
participants (2)
-
Helmut Eller
-
Thomas Christensen