indent based on subsequence of symbol

Lucien Pullen drurowin at
Fri Oct 11 21:44:10 UTC 2013

Also sprach Luís Oliveira on 2013-10-11:
> Have a look at the `common-lisp-get-indentation' function in
> slime/contrib/slime-cl-indent.el. It supports 3 methods for looking up
> indentation information. This is the place where you could add a 4th
> if you want to do it on the Emacs Lisp side.
> slime/contrib/swank-indentation.lisp also has a customization
> mechanism as well, *application-hints-tables*, which might be useful
> if you want to do it on the Common Lisp side.

After quickly reading each of the sources, I think adding the support in
swank-indentation.lisp would be the better place.

I was thinking that modifying has-application-indentation-hint-p to
accept a symbol naming a function or a function object, in addition to a
hash table, that when called would return values like the current
gethash calls.  The author could then use their symbol test function for
indentation rules in the same environment as normal use, instead of it
being in the Emacs Lisp side.

This is more flexible than just accepting a subsequence, and I feel more
simple to implement.  The risk, since the function will be called every
time symbol indentation lookup is done, is the function may be coded as
to make indentation very slow or never happen, but I feel the
flexibility outweighs that risk.

More information about the slime-devel mailing list