summaryrefslogtreecommitdiff
path: root/elisp/geiser-custom.el
diff options
context:
space:
mode:
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