(define-slime-contrib slime-snapshot
"Save&restore memory images without disconnecting"
(:authors "Helmut Eller <[email protected]>")
(:license "Unknown")
(:swank-dependencies swank-snapshot))
(defun slime-snapshot (filename)
"Save a memory image to the file FILENAME."
(interactive (list (read-file-name "Image file: ")))
(slime-eval-with-transcript
`(swank-snapshot:save-snapshot ,(expand-file-name filename))))
(defun slime-restore (filename)
"Restore a memory image stored in file FILENAME."
(interactive (list (read-file-name "Image file: ")))
(slime-net-send `(:emacs-rex (swank-snapshot:restore-snapshot
,(expand-file-name filename))
nil t nil)
(slime-connection)))
(provide 'slime-snapshot)