[slime-devel] [RfC] call-with-foo indentation magic

Helmut Eller heller at common-lisp.net
Fri Aug 20 10:27:06 UTC 2010

* Tobias C Rittweiler [2010-08-20 08:21] writes:

> I'd like to have a function
>   (defun call-with-foo (a b function) ...)
> be indented like
>   (call-with-foo (foo 1 2 3)
>                  (bar 9 8 7)
>     #'(lambda (x)
>          ...))

Still very verbose: call-with- + lambda, or in your case
call-with- + #' + lambda, is a lot of noise.
Seems like a bad idiom to me.  

> I'm tempted to change SWANK indentation update code to recognize
> and treat specially functions starting with CALL-WITH,
> and having a last parameter named FUNCTION or CONTINUATION.
> I could see people not wanting it, so let me ask
> what you guys think. Should this be default behaviour,
> go to a contrib, or should I be damned for raising the
> question?

I don't want that as default. 

IMO a better solution would be a defining macro that defines call-with-X
functions and automatically the corresponding with-X macros with
appropriate use of &body.  The same approach could also deal with do-X
style macros.


More information about the slime-devel mailing list