summaryrefslogtreecommitdiff
path: root/elisp/geiser-custom.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-09-11 22:01:14 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-09-11 22:01:14 +0200
commitd5dfd349a4126324ff5fb41a2c20edf8725edda9 (patch)
tree37d4d2599a47cf09240f58b1f32743e7d7c24b37 /elisp/geiser-custom.el
parentbf4b717791be199ce21a0c36b4b7baf3f8511f66 (diff)
downloadgeiser-guile-d5dfd349a4126324ff5fb41a2c20edf8725edda9.tar.gz
geiser-guile-d5dfd349a4126324ff5fb41a2c20edf8725edda9.tar.bz2
Reload: we now remember user customizations and restore them during geiser-reload.
Diffstat (limited to 'elisp/geiser-custom.el')
-rw-r--r--elisp/geiser-custom.el17
1 files changed, 17 insertions, 0 deletions
diff --git a/elisp/geiser-custom.el b/elisp/geiser-custom.el
index 0b3460f..bdaac06 100644
--- a/elisp/geiser-custom.el
+++ b/elisp/geiser-custom.el
@@ -41,5 +41,22 @@
+;;; Reload support:
+
+(defvar geiser-custom--memoized-vars nil)
+
+(defmacro geiser-custom--defcustom (name &rest body)
+ `(progn
+ (add-to-list 'geiser-custom--memoized-vars ',name)
+ (defcustom ,name ,@body)))
+
+(defun geiser-custom--memoized-state ()
+ (let ((result))
+ (dolist (name geiser-custom--memoized-vars result)
+ (when (boundp name)
+ (push (cons name (symbol-value name)) result)))))
+
+
+
(provide 'geiser-custom)
;;; geiser-custom.el ends here