branch: elpa/inf-clojure commit 6e5504820558c18f167b5435c7649cf37de8d016 Author: Bozhidar Batsov <bozhi...@batsov.com> Commit: Bozhidar Batsov <bozhi...@batsov.com>
[Fix #42] Add a defcustom controlling the window in which the REPL buffer is displayed --- CHANGELOG.md | 5 +++++ inf-clojure.el | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5e8134..686cc76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,11 @@ * [#34](https://github.com/clojure-emacs/inf-clojure/pull/34): Add support for socket REPL connections. * [#46](https://github.com/clojure-emacs/inf-clojure/pull/46): Make it possible to disable prompt on `inf-clojure-set-ns`. * New interactive command `inf-clojure-display-version`. +* [#42](https://github.com/clojure-emacs/inf-clojure/issues/42): Add a defcustom controlling the window in which the REPL buffer is displayed (`inf-clojure-repl-use-same-window`). + +### Changes + +* Display the REPL in a different window by default (it used to be displayed in the current window). ### Bugs Fixed diff --git a/inf-clojure.el b/inf-clojure.el index d2718b9..2fdb97e 100644 --- a/inf-clojure.el +++ b/inf-clojure.el @@ -185,6 +185,12 @@ This should usually be a combination of `inf-clojure-prompt' and (const :tag "never" nil)) :group 'inf-clojure) +(defcustom inf-clojure-repl-use-same-window nil + "Controls whether to display the REPL buffer in the current window or not." + :type '(choice (const :tag "same" t) + (const :tag "different" nil)) + :group 'inf-clojure) + (defvar inf-clojure-buffer nil "The current inf-clojure process buffer. @@ -348,7 +354,9 @@ of `inf-clojure-program'). Runs the hooks from "inf-clojure" (car cmdlist) nil (cdr cmdlist))) (inf-clojure-mode))) (setq inf-clojure-buffer "*inf-clojure*") - (pop-to-buffer-same-window "*inf-clojure*")) + (if inf-clojure-repl-use-same-window + (pop-to-buffer-same-window "*inf-clojure*") + (pop-to-buffer "*inf-clojure*"))) ;;;###autoload (defalias 'run-clojure 'inf-clojure)