diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2013-09-26 19:08:19 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2013-09-26 19:08:19 +0200 |
commit | 368a6ab958c1f8c85cbf94d8982b851959b19798 (patch) | |
tree | bc380f652138e7597e53c822bb53088a87d21f3d | |
parent | e11f7a94a1f2981673abff1dafc241eb7a808716 (diff) | |
download | geiser-368a6ab958c1f8c85cbf94d8982b851959b19798.tar.gz geiser-368a6ab958c1f8c85cbf94d8982b851959b19798.tar.bz2 |
Checking for versions before creating the REPL buffer
... so that we don't end up with a blank, useless buffer around.
-rw-r--r-- | elisp/geiser-repl.el | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el index ebb74c2..995bb3b 100644 --- a/elisp/geiser-repl.el +++ b/elisp/geiser-repl.el @@ -340,8 +340,16 @@ module command as a string") txt) (geiser-autodoc--disinhibit-autodoc))) +(defun geiser-repl--check-version (impl) + (when (not geiser-repl-skip-version-check-p) + (let ((v (geiser-repl--version impl (geiser-repl--binary impl))) + (r (geiser-repl--min-version impl))) + (when (geiser--version< v r) + (error "Geiser requires %s version %s but detected %s" impl r v))))) + (defun geiser-repl--start-repl (impl address) (message "Starting Geiser REPL for %s ..." impl) + (when (not address) (geiser-repl--check-version impl)) (geiser-repl--to-repl-buffer impl) (sit-for 0) (goto-char (point-max)) @@ -372,13 +380,6 @@ module command as a string") geiser-repl-query-on-kill-p) (message "%s up and running!" (geiser-repl--repl-name impl)))) -(defun geiser-repl--check-version (impl) - (when (not geiser-repl-skip-version-check-p) - (let ((v (geiser-repl--version impl (geiser-repl--binary impl))) - (r (geiser-repl--min-version impl))) - (when (geiser--version< v r) - (error "Geiser requires %s version %s but detected %s" impl r v))))) - (defun geiser-repl--start-scheme (impl address prompt) (setq comint-prompt-regexp prompt) (let* ((name (geiser-repl--repl-name impl)) @@ -387,7 +388,6 @@ module command as a string") `(,(geiser-repl--binary impl) nil ,@(geiser-repl--arglist impl))))) - (when (not address) (geiser-repl--check-version impl)) (condition-case err (apply 'make-comint-in-buffer `(,name ,buff ,@args)) (error (insert "Unable to start REPL:\n" |