Comment 2 for bug 777405

Revision history for this message
mon_key (mon-key) wrote :

Following seems to fix the problem:

(defun slime-macroexpand-again ()
  "Reperform the last macroexpansion."
  (interactive)
  (slime-eval-async slime-eval-macroexpand-expression
    (slime-rcurry #'slime-initialize-macroexpansion-buffer
                 ;; :WAS (current-buffer)
                  (slime-buffer-name :macroexpansion))))

The problem seems to be mostly around `slime-initialize-macroexpansion-buffer' which does this:
 (setq buffer-undo-list nil)

IOW the currying in the `slime-macroexpand-again' causes the buffer-undo-list of whatever (current-buffer) returns to loose its undo-list... passing `slime-rcurry' an expliclit buffer (e.g. "*slime-macroexpansion*") should prevent current-buffer from loosing its undo-list when it isn't a "*slime-macroexpansion* buffer.

--
/s_P\