summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2013-09-26 19:08:19 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2013-09-26 19:08:19 +0200
commit0529e5a684e274eb27277329eb36d5b44f0a75d2 (patch)
treefc546ffe80ae5d15d1c35c2a704ea868c0880641
parentbf3f1750579e88c4e636855f912a2138fbd0f632 (diff)
downloadgeiser-guile-0529e5a684e274eb27277329eb36d5b44f0a75d2.tar.gz
geiser-guile-0529e5a684e274eb27277329eb36d5b44f0a75d2.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.el16
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"