[slime-devel] Re: [Patch] Implementation of a macroexpansion stack.
Matthias Koeppe
mkoeppe+slime at mail.math.uni-magdeburg.de
Sat May 13 12:06:44 UTC 2006
"Tobias C. Rittweiler" <tcr at freebits.de> writes:
> Matthias Koeppe <mkoeppe+slime at mail.math.uni-magdeburg.de> writes:
>> "Tobias C. Rittweiler" <tcr at freebits.de> writes:
>> > I implemented the macroexpansion stack that I talked about several
>> > month ago. With the attached patch, it's possible to press `l' (for
>> > "last", like in the inspector) to get to the same content as of the
>> > previous macroexpansion buffer, for example, after an in-place
>> > expansion.
>>
>> Does undo not work for you in the macroexpansion buffer?
>> If it does not, it should be fixed.
>
> 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:
2006-05-13 Matthias Koeppe <mkoeppe at 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.
--- 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))))))
(defun slime-eval-macroexpand-inplace (expander)
"Substitutes the current sexp at place with its macroexpansion.
I will put this improvement into SLIME CVS unless there are objections.
Cheers,
--
Matthias Köppe -- http://www.math.uni-magdeburg.de/~mkoeppe
More information about the slime-devel
mailing list