summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-05-13 23:14:47 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-05-13 23:14:47 +0200
commit757c9525eb3e75d62279f04418c1b3cc278ca1d2 (patch)
tree95821e1f558422c7557e55dc96bbbcd02bd5f2c2
parent6eff04704863544eff626158b0fd318931693284 (diff)
downloadgeiser-757c9525eb3e75d62279f04418c1b3cc278ca1d2.tar.gz
geiser-757c9525eb3e75d62279f04418c1b3cc278ca1d2.tar.bz2
Bug fix: current buffer's impl is used now in switch-to-geiser.
-rw-r--r--elisp/geiser-repl.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index 602122b..7c1779a 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -179,17 +179,18 @@ implementation name gets appended to it."
With prefix argument, ask for which one if more than one is running.
If no REPL is running, execute `run-geiser' to start a fresh one."
(interactive "P")
- (let* ((repl (cond ((and (not ask) (not impl)
+ (let* ((impl (or impl geiser-impl--implementation))
+ (repl (cond ((and (not ask) (not impl)
(or (geiser-repl--this-buffer-repl)
(car geiser-repl--repls))))
- ((and (not ask) impl (geiser-repl--repl/impl impl)))
- ((= 1 (length geiser-repl--repls)) (car geiser-repl--repls))))
- (impl (or impl (and (not repl)
- (or (and (not ask)
- (geiser-repl--only-impl-p))
- (geiser-repl--read-impl "Switch to scheme REPL: ")))))
+ ((and (not ask) impl (geiser-repl--repl/impl impl)))))
(pop-up-windows geiser-repl-window-allow-split))
- (if repl (pop-to-buffer repl) (run-geiser impl))))
+ (if repl
+ (pop-to-buffer repl)
+ (run-geiser (or impl
+ (and (not ask)
+ (geiser-repl--only-impl-p))
+ (geiser-repl--read-impl "Switch to scheme REPL: "))))))
(defalias 'geiser 'switch-to-geiser)