[slime-devel] [patch] a way to specify custom Emacs indentation right in the Lisp source

Harald Hanche-Olsen hanche at math.ntnu.no
Sat Aug 25 15:50:45 UTC 2007


+ Michael Livshin <gmane at cmm.kakpryg.net>:

| for example: if the body of a certain macro is really a list of
| function bindings, then one would like those bindings to be indented
| properly.  as it happens, Emacs (or rather
| common-lisp-indent-function) can be told exactly how to do that, but
| this information cannot be expressed by the macro argument list alone.
| 
| the attached patch adds a way to define and access custom indentation
| specifications like this:
| 
| <example>
| (defmacro my-macro (name (&rest args) &body function-bindings)
|   ...)

Uh, am I missing something here, or is that an inappropriate use of
&body?  I would use &rest in this situation.  Why don't you?  Of
course, it would probably still not give the appropriate indentation,
so emacs still needs some help.  It's just that my gut reaction says
that a list of function bindings is not a body, and so saying it is
one seems disingenuous.

- Harald




More information about the slime-devel mailing list