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

Helmut Eller heller at common-lisp.net
Sat Aug 25 17:09:04 UTC 2007


* Michael Livshin [2007-08-25 17:01+0200] writes:

> <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>

Can't you do that with Emacs' file local variables?  E.g.

;; Local Variables:
;; eval: (set-indentation '(6 4 (&whole 2 &rest (&whole 1 &lambda &body))))
;; End:

set-indentation is just a hypothetical name to illustrate the idea.
This way we wouldn't need to put anything into *features* and the file
could also be edited without connected Lisp.

Helmut.



More information about the slime-devel mailing list