summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2011-03-05 13:28:34 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2011-03-05 13:28:34 +0100
commit5846152ba151bbd9da1e361059dd1337d23506c2 (patch)
tree7df69c247b40fe409488211eb4898a9cb657b85d
parent8e9389571057f3b0be4f43b54783cd202020d581 (diff)
downloadgeiser-5846152ba151bbd9da1e361059dd1337d23506c2.tar.gz
geiser-5846152ba151bbd9da1e361059dd1337d23506c2.tar.bz2
Bug fix: honour geiser-repl-use-other-window
-rw-r--r--NEWS5
-rw-r--r--doc/repl.texi4
-rw-r--r--elisp/geiser-repl.el16
3 files changed, 17 insertions, 8 deletions
diff --git a/NEWS b/NEWS
index 563a9f3..10f5c1d 100644
--- a/NEWS
+++ b/NEWS
@@ -8,12 +8,13 @@
Bug fixes:
+ - We no longer ignore geiser-repl-use-other-window.
- Company mode integration fixes (including #32231).
- M-x geiser-edit-module in REPL buffers fixed.
- We now respect user customizations of geiser-implementations-alist.
- Interaction with Guile's debugger fixed.
- - Navigable paths in warnings buffer for Guile 2.0.
- - Fix for errors when entering R5RS modules in Racket.
+ - "Clickable" paths in warnings buffer also for Guile 2.0.
+ - Fix for errors when entering r5rs modules in Racket.
* Version 0.1.1 (Jan 24, 2011)
diff --git a/doc/repl.texi b/doc/repl.texi
index feb47c4..b01295d 100644
--- a/doc/repl.texi
+++ b/doc/repl.texi
@@ -26,7 +26,9 @@ the supported implementations you want to launch---yes, you can stop the
asking, see @altr{active-implementations,below,Customization and tips,.}
Tabbing for completion will offer you, as of this writing, @code{guile}
and @code{racket}. Just choose your poison, and a new REPL buffer will
-pop up.
+pop up (by default, the REPL will appear in a new window: if that annoys
+you, just set @code{geiser-repl-use-other-window} to @code{nil} and the
+current window will be used).
@imgc{repls}
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index fd274a7..b69c64f 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -183,6 +183,13 @@ module command as a string")
(defsubst geiser-repl--repl-name (impl)
(format "%s REPL" (geiser-impl--impl-str impl)))
+(defun geiser-repl--switch-to-buffer (buffer)
+ (unless (eq buffer (current-buffer))
+ (let ((pop-up-windows geiser-repl-window-allow-split))
+ (if geiser-repl-use-other-window
+ (switch-to-buffer-other-window buffer)
+ (switch-to-buffer buffer)))))
+
(defun geiser-repl--to-repl-buffer (impl)
(unless (and (eq major-mode 'geiser-repl-mode)
(not (get-buffer-process (current-buffer))))
@@ -190,7 +197,7 @@ module command as a string")
(old (and (buffer-live-p old)
(not (get-buffer-process old))
old)))
- (pop-to-buffer
+ (geiser-repl--switch-to-buffer
(or old
(generate-new-buffer (format "* %s *"
(geiser-repl--repl-name impl)))))
@@ -597,13 +604,12 @@ If no REPL is running, execute `run-geiser' to start a fresh one."
((and (not ask)
(not in-repl)
impl
- (geiser-repl--repl/impl impl)))))
- (pop-up-windows geiser-repl-window-allow-split))
+ (geiser-repl--repl/impl impl))))))
(cond ((or in-live-repl
(and (eq (current-buffer) repl) (not (eq repl buffer))))
(when (buffer-live-p geiser-repl--last-scm-buffer)
- (pop-to-buffer geiser-repl--last-scm-buffer)))
- (repl (pop-to-buffer repl))
+ (geiser-repl--switch-to-buffer geiser-repl--last-scm-buffer)))
+ (repl (geiser-repl--switch-to-buffer repl))
((geiser-repl--remote-p) (geiser-connect impl))
(t (run-geiser impl)))
(when (and buffer (eq major-mode 'geiser-repl-mode))