Hi again, On Mon, Aug 20, 2007 at 03:31:26AM +0200, Johannes Weiner wrote: > > here is a patch that extracts last-sexp from already existing code so that one > > can use last-sexp for other purposes too. > > My real goals where of course, interactive macro expansion while editing lisp > code. So I implemented that also. The result is now a more generalized > operation functionality on the sexp before point. I realized now that macroexpansion really should not be done without pretty-printing, the resulting forms are unreadable when they are more than just a setf -> setq expansion. So please forget about the above patches, here is one that extends the code in pp.el by `pp-macroexpand-expression' and `pp-macroexpand-last-sexp'. The code is now a lot shorter, more readable and the results more usable. Diff attached, have fun! Hannes