diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-03-09 23:52:04 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-03-09 23:52:04 +0100 |
commit | 3b6e0b859262970b43672ed7c9207187b2518976 (patch) | |
tree | d0d838fb74c2cd027225ff96fd76625dcab16939 /elisp/geiser-popup.el | |
parent | 6d765e0f93254c1606e1d794b5376916750f3738 (diff) | |
download | geiser-3b6e0b859262970b43672ed7c9207187b2518976.tar.gz geiser-3b6e0b859262970b43672ed7c9207187b2518976.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.el | 14 |
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 |