[slime-devel] indentation ???
e9626484 at stud3.tuwien.ac.at
Sun Oct 17 19:00:57 UTC 2004
"Pascal J.Bourguignon" <pjb at informatimago.com> writes:
> Indentation with slime:
> (DEFMACRO DEFTRANSLATION (TABLE TEXT LANGUAGE TRANSLATION
> &REST LANGS-TRANS)
> (DEFVAR ,TABLE (MAKE-HASH-TABLE :TEST (FUNCTION EQUAL)))
> (SETF ,@(DO ((LT (CONS LANGUAGE (CONS TRANSLATION LANGS-TRANS)))
> (RESULT ,()))
> ((NULL LT) (NREVERSE RESULT))
> (PUSH `(GETHASH (CONS ,TEXT ,(POP LT)) ,TABLE))
> (LET ((TRANS (POP LT)))
> (IF (EQ TRANSLATION :IDEM) `,TEXT `,TRANSLATION)))))
> (DEFUN LOCALIZE (TABLE LANGUAGE TEXT)
> RETURN: A version of the text in the given language.
> (LET ((SYM (INTERN-SOFT TEXT TABLE)))
> (IF SYM
> (LET ((RESULT (GET SYM LANGUAGE)))
> (IF RESULT
> (LOCALIZE TABLE :EN TEXT)))
> The slime-indentation of &REST is right, but all the rest is wrong.
> How could I disable it?
As far as I can see, only the forms beginning with "`(progn" and
",@(do" are wrong.
Emacs thinks the backquoted list is some generic data and not code.
In newer Emacsen have a variable lisp-backquote-indentation to control
this. Setting it to t should give better results. But I think there
a bug in common-lisp-indent-function, because I can't see any the
reason why ",@(do" should ever be considered as data. I think I fixed
that in the cl-inded.el file which is now included in SLIME. See the
More information about the slime-devel