summaryrefslogtreecommitdiff
path: root/elisp/geiser-popup.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-09 23:52:04 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-09 23:52:04 +0100
commiteafe05ed39cf33ed8a3dd6d6a875dc2be00a19d2 (patch)
tree8fee8e87a3bbe516a4098e9b3140c5b2e8de22db /elisp/geiser-popup.el
parentbaf8e5e99b0650690b16f4bb8ff1dd5736f18a3a (diff)
downloadgeiser-guile-eafe05ed39cf33ed8a3dd6d6a875dc2be00a19d2.tar.gz
geiser-guile-eafe05ed39cf33ed8a3dd6d6a875dc2be00a19d2.tar.bz2
Support for multiple Scheme implementations, Chapter 1.
* Evaluation system is now pluggable * The rest of the system understands said pluggability * Guile provides its own implementation (geiser-guile) * The reload system is aware of the new kids on the block
Diffstat (limited to 'elisp/geiser-popup.el')
-rw-r--r--elisp/geiser-popup.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/elisp/geiser-popup.el b/elisp/geiser-popup.el
index d412029..486d1d8 100644
--- a/elisp/geiser-popup.el
+++ b/elisp/geiser-popup.el
@@ -58,12 +58,18 @@
'(("q" . geiser-popup--quit))
(setq buffer-read-only t))
+
+;;; Support for defining popup buffers and accessors:
+
+(defvar geiser-popup--registry nil)
+
(defmacro geiser-popup--define (base name mode)
(let ((get-buff (intern (format "geiser-%s--buffer" base)))
(pop-buff (intern (format "geiser-%s--pop-to-buffer" base)))
(with-macro (intern (format "geiser-%s--with-buffer" base)))
(method (make-symbol "method")))
`(progn
+ (add-to-list 'geiser-popup--registry ,name)
(defun ,get-buff ()
(or (get-buffer ,name)
(with-current-buffer (get-buffer-create ,name)
@@ -84,5 +90,13 @@
(put 'geiser-popup--define 'lisp-indent-function 1)
+;;; Reload support:
+
+(defun geiser-popup-unload-function ()
+ (dolist (name geiser-popup--registry)
+ (when (buffer-live-p (get-buffer name))
+ (kill-buffer name))))
+
+
(provide 'geiser-popup)
;;; geiser-popup.el ends here