Matthias Koeppe mkoeppe+slime@mail.math.uni-magdeburg.de writes:
"Tobias C. Rittweiler" tcr@freebits.de writes:
Matthias Koeppe mkoeppe+slime@mail.math.uni-magdeburg.de writes:
Does undo not work for you in the macroexpansion buffer? [...]
Well, does it work for you? (Remember, the macroexpansion buffer is read only!)
Well, it works after making the buffer read/write with C-x C-q.
But probably it's better to make the buffer read/write from the beginning:
I'm not sure. I actually like the read-only property because it makes the macroexpansion buffer "special", i.e. not just another arbitrary buffer with code. YMMV.
2006-05-13 Matthias Koeppe mkoeppe@mail.math.uni-magdeburg.de
- slime.el (slime-eval-macroexpand): Make the macro expansion
buffer read/write, so that it is possible to `undo' in-place macroexpansions.
Is it possible to shadow `undo' buffer-locally?
--- slime.el.~1.618.~ 2006-04-20 06:38:14.000000000 +0200 +++ slime.el 2006-05-13 14:00:52.000000000 +0200 @@ -7330,7 +7330,12 @@ ("*SLIME macroexpansion*" lisp-mode) package (slime-macroexpansion-minor-mode) (insert expansion)
(font-lock-fontify-buffer))))))
(font-lock-fontify-buffer))
;; Make buffer read-write, so that it is possible to `undo'
;; in-place macroexpansions.
(with-current-buffer
"*SLIME macroexpansion*"
(setq buffer-read-only nil))))))
[...]
(Personally, I think adding a READ-ONLY-P keyword argument to SLIME-WITH-OUTPUT-TO-TEMP-BUFFER would be a more elegant [as in reusable] solution.)
-T.