Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
marvel
GitHub Repository: marvel/qnf
Path: blob/master/elisp/slime/contrib/slime-snapshot.el
990 views
1
2
(define-slime-contrib slime-snapshot
3
"Save&restore memory images without disconnecting"
4
(:authors "Helmut Eller <[email protected]>")
5
(:license "Unknown")
6
(:swank-dependencies swank-snapshot))
7
8
(defun slime-snapshot (filename)
9
"Save a memory image to the file FILENAME."
10
(interactive (list (read-file-name "Image file: ")))
11
(slime-eval-with-transcript
12
`(swank-snapshot:save-snapshot ,(expand-file-name filename))))
13
14
(defun slime-restore (filename)
15
"Restore a memory image stored in file FILENAME."
16
(interactive (list (read-file-name "Image file: ")))
17
;; bypass event dispatcher because we don't expect a reply. FIXME.
18
(slime-net-send `(:emacs-rex (swank-snapshot:restore-snapshot
19
,(expand-file-name filename))
20
nil t nil)
21
(slime-connection)))
22
23
(provide 'slime-snapshot)
24
25