summaryrefslogtreecommitdiff
path: root/elisp/geiser-mode.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
commit3b6e0b859262970b43672ed7c9207187b2518976 (patch)
treed0d838fb74c2cd027225ff96fd76625dcab16939 /elisp/geiser-mode.el
parent6d765e0f93254c1606e1d794b5376916750f3738 (diff)
downloadgeiser-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-mode.el')
-rw-r--r--elisp/geiser-mode.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/elisp/geiser-mode.el b/elisp/geiser-mode.el
index 4bb2dcf..640a7e9 100644
--- a/elisp/geiser-mode.el
+++ b/elisp/geiser-mode.el
@@ -31,6 +31,7 @@
(require 'geiser-edit)
(require 'geiser-autodoc)
(require 'geiser-debug)
+(require 'geiser-impl)
(require 'geiser-eval)
(require 'geiser-repl)
(require 'geiser-popup)
@@ -153,6 +154,7 @@ interacting with the Geiser REPL is at your disposal.
:lighter geiser-mode-string
:group 'geiser-mode
:keymap geiser-mode-map
+ (when geiser-mode (geiser-impl--set-buffer-implementation))
(setq geiser-autodoc-mode-string "/A")
(setq geiser-smart-tab-mode-string "/T")
(when geiser-mode-autodoc-p (geiser-autodoc-mode geiser-mode))
@@ -212,9 +214,17 @@ interacting with the Geiser REPL is at your disposal.
(dolist (buffer (buffer-list))
(when (buffer-live-p buffer)
(set-buffer buffer)
- (when geiser-mode (push buffer buffers))))
+ (when geiser-mode
+ (push (cons buffer geiser-impl--implementation) buffers))))
buffers))
+(defun geiser-mode--restore (buffers)
+ (dolist (b buffers)
+ (when (buffer-live-p (car b))
+ (set-buffer (car b))
+ (geiser-mode 1)
+ (when (cdr b) (geiser-impl--set-buffer-implementation (cdr b))))))
+
(provide 'geiser-mode)
;;; geiser-mode.el ends here