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 | |
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')
-rw-r--r-- | elisp/geiser-guile.el | 2 | ||||
-rw-r--r-- | elisp/geiser-impl.el | 14 | ||||
-rw-r--r-- | elisp/geiser-racket.el | 10 |
3 files changed, 12 insertions, 14 deletions
diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el index 91a316b..a88cf54 100644 --- a/elisp/geiser-guile.el +++ b/elisp/geiser-guile.el @@ -225,6 +225,8 @@ This function uses `geiser-guile-init-file' if it exists." (display-help) (check-buffer geiser-guile--guess)) +(geiser-impl--add-to-alist 'regexp "\\.scm$" 'guile nil) + (provide 'geiser-guile) ;;; geiser-guile.el ends here 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)))) diff --git a/elisp/geiser-racket.el b/elisp/geiser-racket.el index 4517f01..dcff4cc 100644 --- a/elisp/geiser-racket.el +++ b/elisp/geiser-racket.el @@ -29,17 +29,17 @@ (cond ((eq system-type 'windows-nt) "Racket.exe") ((eq system-type 'darwin) "racket") (t "racket")) - "Name to use to call the mzscheme executable when starting a REPL." + "Name to use to call the racket executable when starting a REPL." :type '(choice string (repeat string)) :group 'geiser-racket) (geiser-custom--defcustom geiser-racket-collects nil - "A list of paths to be added to mzscheme's collection directories." + "A list of paths to be added to racket's collection directories." :type '(repeat file) :group 'geiser-racket) (geiser-custom--defcustom geiser-racket-init-file "~/.racket-geiser" - "Initialization file with user code for the mzscheme REPL." + "Initialization file with user code for the racket REPL." :type 'string :group 'geiser-racket) @@ -53,7 +53,7 @@ geiser-racket-binary)) (defun geiser-racket--parameters () - "Return a list with all parameters needed to start mzscheme. + "Return a list with all parameters needed to start racket. This function uses `geiser-racket-init-file' if it exists." (let ((init-file (and (stringp geiser-racket-init-file) (expand-file-name geiser-racket-init-file)))) @@ -213,8 +213,6 @@ This function uses `geiser-racket-init-file' if it exists." (binding-forms geiser-racket--binding-forms) (binding-forms* geiser-racket--binding-forms*)) -(geiser-impl--add-to-alist 'regexp - "\\.\\(mzscheme\\|racket\\)\\.sl?s$" 'racket t) (geiser-impl--add-to-alist 'regexp "\\.ss$" 'racket t) (geiser-impl--add-to-alist 'regexp "\\.rkt$" 'racket t) |