[slime-devel] Re: macro expansion goes into buffer

Marco Baringer mb at bese.it
Thu Jan 25 15:54:55 UTC 2007


Evrim ULU <evrim at core.gen.tr> writes:

> I'm looking for a binding which expands the current statement (a
> macro) and append the expansion to the current buffer. Do slime has
> something like this?

[totatly untested]

(defun slime-macroexpand-in-place (&optional string)
  (interactive)
  (unless string
    (setf string (slime-sexp-at-point-or-error)))
  (lexical-let ((package (slime-current-package)))
    (insert (slime-eval `(swank:swank-macroexpand-1 ,string)))))

> thnx.
> evrim.

-- 
-Marco
Ring the bells that still can ring.
Forget your perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen




More information about the slime-devel mailing list