hi all,
I find that sometimes the usual Slime way of determining macro indentation based on the position of the &BODY parameter in the argument list is not quite enough.
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) ...)
#+swank (setf (swank:emacs-indentation 'my-macro) '(6 4 (&whole 2 &rest (&whole 1 &lambda &body)))) </example>
[ which won't work exactly as written, of course, because unfortunately Swank does not push anything onto *FEATURES*... ]
thanks, --m
* swank.lisp (*emacs-indentation*): New hash table, used to hold custom indentation specs. (emacs-indentation): Accessor for the above. (symbol-indentation): Use it.
* slime.el (slime-clean-indent-spec): New function, removes CL package prefixes from symbols sent from Lisp. (slime-handle-indentation-update): Use it.