summaryrefslogtreecommitdiff
path: root/elisp/geiser-impl.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-16 01:39:28 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-16 01:39:28 +0100
commiteac44dafd8a451e0f452c489b4da52e7eea84ec3 (patch)
treefa3c57b48b4d81b09cd775df2abf12452762ff76 /elisp/geiser-impl.el
parent3a20baccd8b01a3eb72254e209a4c168a05de8a7 (diff)
downloadgeiser-eac44dafd8a451e0f452c489b4da52e7eea84ec3.tar.gz
geiser-eac44dafd8a451e0f452c489b4da52e7eea84ec3.tar.bz2
Many a bug fix in multiple implementation support.
Diffstat (limited to 'elisp/geiser-impl.el')
-rw-r--r--elisp/geiser-impl.el32
1 files changed, 26 insertions, 6 deletions
diff --git a/elisp/geiser-impl.el b/elisp/geiser-impl.el
index 20b648e..2cec381 100644
--- a/elisp/geiser-impl.el
+++ b/elisp/geiser-impl.el
@@ -67,7 +67,7 @@
;;; Installing Scheme implementations:
-(make-local-variable
+(make-variable-buffer-local
(defvar geiser-impl--implementation nil))
(defsubst geiser-impl--impl-feature (impl)
@@ -159,12 +159,32 @@
;;; Access to implementation guessing function:
+(make-variable-buffer-local
+ (defvar geiser-scheme-implementation nil
+ "Set this buffer local variable to specify the Scheme
+implementation to be used by Geiser."))
+
(defun geiser-impl--guess ()
- (catch 'impl
- (dolist (impl geiser-impl--impls)
- (when (geiser-impl--call-if-bound impl "guess")
- (throw 'impl impl)))
- (geiser-impl--default-implementation)))
+ (or geiser-impl--implementation
+ geiser-scheme-implementation
+ (catch 'impl
+ (dolist (impl geiser-impl--impls)
+ (when (geiser-impl--call-if-bound impl "guess")
+ (throw 'impl impl))))
+ (geiser-impl--default-implementation)))
+
+
+;;; User commands:
+(defvar geiser-impl--impl-prompt-history nil)
+
+(defun geiser-impl--read-impl (&optional prompt impls)
+ (let* ((impls (or impls geiser-impl--impls))
+ (impls (mapcar (lambda (s) (format "%s" s)) impls))
+ (prompt (or prompt "Scheme implementation: ")))
+ (intern (completing-read prompt impls nil t nil
+ geiser-impl--impl-prompt-history
+ (and (car geiser-impl--impls)
+ (symbol-name (car geiser-impl--impls)))))))
;;; Unload support