Is there an Elisp analogue for the SLIME macrostepper? Specifically, I’m looking for something that expands code at point into the next expansion step (or just the final expansion) in a new buffer.
The naive
(defun macroexpand-point ()
(interactive)
(let ((b (get-buffer-create "*el-macroexpansion*"))
(expansion (format "%s" (macroexpand (thing-at-point 'sexp)))))
(with-current-buffer b
(insert expansion)
(display-buffer b))))
doesn’t do what I’m expecting here.
Perhaps you need this:
The whole function can be expressed more succintly thus