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 | 941d65165b3bce917d3bff9952e582800ccf2981 (patch) | |
tree | 76ae53d65dc284f65edb5b1f9110e2e56a4ab48f /elisp/geiser-impl.el | |
parent | d2f2b41c0926ae538ce4acc190150f49e56bc9d5 (diff) | |
download | geiser-guile-941d65165b3bce917d3bff9952e582800ccf2981.tar.gz geiser-guile-941d65165b3bce917d3bff9952e582800ccf2981.tar.bz2 |
Tweaks to scheme implementation selection, and docs for it.
Diffstat (limited to 'elisp/geiser-impl.el')
-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)))) |