From da9cae93e180463bb158461f5d008da83c172ed7 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Mon, 16 Mar 2009 01:39:28 +0100 Subject: Many a bug fix in multiple implementation support. --- elisp/geiser-impl.el | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) (limited to 'elisp/geiser-impl.el') 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 -- cgit v1.2.3