So, turns out that slime-indentation contrib has the hooks for just what I needed.
...only the code had a bit of bitrot in it, as intentation specs with symbols in them ended up having strings on the Emacs side. I just committed a fix for that, so what now I can do eg:
(defvar *indentation-hint-table* nil)
(defun hint-slime-indentation () (let* ((swank (find-package :swank)) (tables (when swank (find-symbol (string '#:*application-hints-tables*) swank)))) (when tables (let ((table (make-hash-table :test #'eq))) (setf (gethash 'defrule table) '(4 &lambda &rest (&whole 2 &lambda &body))) (set tables (cons table (remove *indentation-hint-table* (symbol-value tables)))) (setf *indentation-hint-table* table)) t)))
(hint-slime-indentation)
on the CL side to tell Slime how to indent things it's regular heuristics don't get right.
Cheers,
-- Nikodemus