summaryrefslogtreecommitdiff
path: root/cider-mode.el
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar@batsov.com>2015-11-28 10:27:28 +0200
committerBozhidar Batsov <bozhidar@batsov.com>2015-11-28 10:34:38 +0200
commit3186afa311c8c6c37c73c0ea0333a08ddba8f78c (patch)
treece181994c5f1e76e5780b9d9b934453e98d2af5b /cider-mode.el
parentf37db431aa9046167e9f9dfe31da65354e1b5f5d (diff)
Remove distinct REPL-switching commands
They are now redundant as you could get the old behaviour just by customizing the request dispatch logic. If it's set to static you'd always go to the default REPL and otherwise you'd get the "relevant" REPL behaviour.
Diffstat (limited to 'cider-mode.el')
-rw-r--r--cider-mode.el34
1 files changed, 2 insertions, 32 deletions
diff --git a/cider-mode.el b/cider-mode.el
index 3f429380..ea3c7246 100644
--- a/cider-mode.el
+++ b/cider-mode.el
@@ -85,15 +85,6 @@ entirely."
`cider-switch-to-last-clojure-buffer' uses this variable to jump
back to last Clojure source buffer.")
-(defcustom cider-switch-to-repl-command 'cider-switch-to-relevant-repl-buffer
- "Select the command to be invoked when switching-to-repl.
-The default option is `cider-switch-to-relevant-repl-buffer'. If
-you'd like to not use smart matching of repl buffer based on
-project directory, you can assign it to `cider-switch-to-current-repl-buffer'
-which will use the default REPL connection."
- :type 'symbol
- :group 'cider)
-
(defun cider-remember-clojure-buffer (buffer)
"Try to remember the BUFFER from which the user jumps.
The BUFFER needs to be a Clojure buffer and current major mode needs
@@ -105,11 +96,6 @@ to jump back to the last Clojure source buffer."
(derived-mode-p 'cider-repl-mode))
(setq cider-last-clojure-buffer buffer)))
-(defun cider-switch-to-repl-buffer (&optional arg)
- "Invoke `cider-switch-to-repl-command'."
- (interactive "P")
- (funcall cider-switch-to-repl-command arg))
-
(defun cider--switch-to-repl-buffer (repl-buffer &optional set-namespace)
"Select the REPL-BUFFER, when possible in an existing window.
@@ -131,22 +117,7 @@ that of the namespace in the Clojure source buffer."
(cider-remember-clojure-buffer buffer)
(goto-char (point-max))))
-(defun cider-switch-to-default-repl-buffer (&optional set-namespace)
- "Select the default REPL buffer, when possible in an existing window.
-
-Hint: You can use `display-buffer-reuse-frames' and
-`special-display-buffer-names' to customize the frame in which
-the buffer should appear.
-
-With a prefix argument SET-NAMESPACE, sets the namespace in the REPL buffer to
-that of the namespace in the Clojure source buffer."
- (interactive "P")
- (cider--switch-to-repl-buffer (cider-default-connection) set-namespace))
-
-(define-obsolete-function-alias 'cider-switch-to-current-repl-buffer
- 'cider-switch-to-default-repl-buffer "0.10")
-
-(defun cider-switch-to-relevant-repl-buffer (&optional set-namespace)
+(defun cider-switch-to-repl-buffer (&optional set-namespace)
"Select the REPL buffer, when possible in an existing window.
The buffer chosen is based on the file open in the current buffer.
@@ -169,7 +140,7 @@ of the namespace in the Clojure source buffer."
"Load the current buffer into the relevant REPL buffer and switch to it."
(interactive "P")
(cider-load-buffer)
- (cider-switch-to-relevant-repl-buffer set-namespace))
+ (cider-switch-to-repl-buffer set-namespace))
(defun cider-switch-to-last-clojure-buffer ()
"Switch to the last Clojure buffer.
@@ -285,7 +256,6 @@ Returns to the buffer in which the command was invoked."
"--"
["Set ns" cider-repl-set-ns]
["Switch to REPL" cider-switch-to-repl-buffer]
- ["Switch to Relevant REPL" cider-switch-to-relevant-repl-buffer]
["Toggle REPL Pretty Print" cider-repl-toggle-pretty-printing]
["Clear REPL output" cider-find-and-clear-repl-output]
"--"