[slime-devel] Re: Indenting macro bodies

Luke Gorrie luke at synap.se
Wed Oct 6 09:04:40 UTC 2004


Arthur Lemmens <alemmens at xs4all.nl> writes:

> Hi,
> 
> I'm a happy new user of SLIME (using it with ACL 7.0 beta), but
> I have one question.
> 
> After defining and compiling macro with a &body parameter, like
> 
> (defmacro test ((x) &body body)
>   `(progn (list ,x) , at body))
> 
> I would like all use of such a macro to be indented as follows:
> 
> (test (1)
>   (do 'a)
>   (do 'b))

This should work, but there are a few things that can muck it up.
Since indentation of flet and labels isn't right for you I'm guessing
that Emacs is indenting Common Lisp code as if it were Emacs Lisp. In
that case you can fix it by adding this to your ~/.emacs:

  (slime-setup)

The key is to have `lisp-indent-function' set to
`common-lisp-indent-function' in your lisp-mode buffers.

If that wasn't the problem then the next thing is to see if SLIME is
able to discover the arglist of the TEST function correctly, e.g. by
typing "(test " and checking if arglist display includes &body.

Cheers,
Luke






More information about the slime-devel mailing list