From 757c9525eb3e75d62279f04418c1b3cc278ca1d2 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Wed, 13 May 2009 23:14:47 +0200 Subject: Bug fix: current buffer's impl is used now in switch-to-geiser. --- elisp/geiser-repl.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'elisp') 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) -- cgit v1.2.3