summaryrefslogtreecommitdiff
path: root/elisp/geiser.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-11 04:06:57 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-11 04:06:57 +0100
commit7763b169589be534220e1ffc3e0fd08304124914 (patch)
treeb1ba2dc95cfef9f9c098ea225d3e2910115d127b /elisp/geiser.el
parent51fa372caa4ea78178ff67cf70cc7167870f742f (diff)
downloadgeiser-7763b169589be534220e1ffc3e0fd08304124914.tar.gz
geiser-7763b169589be534220e1ffc3e0fd08304124914.tar.bz2
Support for multiple Scheme implementations, Chapter 2.
* The REPL is aware of multiple implementations... * and it knows how to create more than one connection for guile; * but it's not been tested with more than one implementation. * geiser-mode seems to be able to keep track of active REPLs.
Diffstat (limited to 'elisp/geiser.el')
-rw-r--r--elisp/geiser.el24
1 files changed, 17 insertions, 7 deletions
diff --git a/elisp/geiser.el b/elisp/geiser.el
index f7917f4..61411dc 100644
--- a/elisp/geiser.el
+++ b/elisp/geiser.el
@@ -48,10 +48,16 @@
(autoload 'geiser "geiser-repl.el"
"Start a Geiser REPL, or switch to a running one." t)
-(autoload 'run-guile "geiser-repl.el"
+(autoload 'run-geiser "geiser-repl.el"
+ "Start a Geiser REPL." t)
+
+(autoload 'switch-to-geiser "geiser-guile.el"
+ "Switch to a running one Geiser REPL." t)
+
+(autoload 'run-guile "geiser-guile.el"
"Start a Geiser Guile REPL, or switch to a running one." t)
-(autoload 'switch-to-guile "geiser-repl.el"
+(autoload 'switch-to-guile "geiser-guile.el"
"Start a Geiser Guile REPL, or switch to a running one." t)
(autoload 'geiser-mode "geiser-mode.el"
@@ -75,7 +81,11 @@
(eval-after-load "scheme"
'(add-hook 'scheme-mode-hook 'turn-on-geiser-mode)))
-(defun geiser-setup ()
+(defun geiser-setup-implementations (impls)
+ (setq geiser-impl--impls (append '(guile) impls)))
+
+(defun geiser-setup (&rest impls)
+ (geiser-setup-implementations impls)
(geiser-setup-scheme-mode))
@@ -124,7 +134,7 @@ loaded."
geiser-root-dir))
(geiser-main-file (expand-file-name "elisp/geiser.el" dir))
(impls (and (featurep 'geiser-impl) geiser-impl--impls))
- (repl (and (featurep 'geiser-repl) (geiser-repl--live-p)))
+ (repls (and (featurep 'geiser-repl) (geiser-repl--repl-list)))
(buffers (and (featurep 'geiser-mode) (geiser-mode--buffers))))
(unless (file-exists-p geiser-main-file)
(error "%s does not contain Geiser!" dir))
@@ -134,9 +144,9 @@ loaded."
(geiser-setup)
(dolist (feature (reverse (geiser--features-list)))
(load-library (format "%s" feature)))
- (when impls (geiser-impl--reload-implementations impls))
- (when repl (geiser 'repl))
- (when buffers (geiser-mode--restore buffers))
+ (geiser-impl--reload-implementations impls)
+ (geiser-repl--restore repls)
+ (geiser-mode--restore buffers)
(message "Geiser reloaded!")))