diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-07-25 22:35:41 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-07-25 22:35:41 +0200 |
commit | 630fe511b7ca38d22dc6729b73989b20b3a21076 (patch) | |
tree | 27553150cf840f0bb58570b2a885899fce651948 /elisp | |
parent | ecc26059f3a60b1c04c8900444ac114c434d2fa0 (diff) | |
download | geiser-630fe511b7ca38d22dc6729b73989b20b3a21076.tar.gz geiser-630fe511b7ca38d22dc6729b73989b20b3a21076.tar.bz2 |
Tweaks to scheme implementation selection, and docs for it.
Diffstat (limited to 'elisp')
-rw-r--r-- | elisp/geiser-impl.el | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/elisp/geiser-impl.el b/elisp/geiser-impl.el index e7fb2f8..b4a4b8f 100644 --- a/elisp/geiser-impl.el +++ b/elisp/geiser-impl.el @@ -148,11 +148,9 @@ determine its scheme flavour." (runner-doc (format "Start a new %s REPL." name)) (switcher-doc (format "Switch to a running %s REPL, or start one." name)) - (impl-rx (format "\\.\\(%s\\)\\.s\\(l?s|cm\\)$" name)) (ask (make-symbol "ask"))) `(progn (geiser-impl--define ,load-file-name ',name ',parent ',methods) - (geiser-impl--add-to-alist 'regexp ,impl-rx ',name t) (require 'geiser-repl) (require 'geiser-menu) (defun ,runner () @@ -201,19 +199,19 @@ buffer contains Scheme code of the given implementation.") (defun geiser-impl--guess (&optional prompt) (or geiser-impl--implementation geiser-scheme-implementation + (and (null (cdr geiser-active-implementations)) + (car geiser-active-implementations)) (catch 'impl + (dolist (impl geiser-active-implementations) + (when (geiser-impl--check-buffer impl) + (throw 'impl impl))) (let ((bn (buffer-file-name))) (when bn (dolist (x geiser-implementations-alist) (when (and (memq (cadr x) geiser-active-implementations) (geiser-impl--match-impl (car x) bn)) - (throw 'impl (cadr x)))))) - (dolist (impl geiser-active-implementations) - (when (geiser-impl--check-buffer impl) - (throw 'impl impl)))) + (throw 'impl (cadr x))))))) geiser-default-implementation - (and (null (cdr geiser-active-implementations)) - (car geiser-active-implementations)) (and prompt (geiser-impl--read-impl)))) |