Function: cider-repl-type-for-buffer
cider-repl-type-for-buffer is a byte-compiled function defined in
cider-connection.el.
Signature
(cider-repl-type-for-buffer &optional BUFFER)
Documentation
Return the matching connection type (clj or cljs) for BUFFER.
BUFFER defaults to the current-buffer. In cljc buffers return
multi. This function infers connection type based on the major mode.
For the REPL type use the function cider-repl-type(var)/cider-repl-type(fun).
Aliases
cider-connection-type-for-buffer
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-connection.el
(defun cider-repl-type-for-buffer (&optional buffer)
"Return the matching connection type (clj or cljs) for BUFFER.
BUFFER defaults to the `current-buffer'. In cljc buffers return
multi. This function infers connection type based on the major mode.
For the REPL type use the function `cider-repl-type'."
(with-current-buffer (or buffer (current-buffer))
(cond
((cider-clojurescript-major-mode-p) 'cljs)
((cider-clojurec-major-mode-p) cider-clojurec-eval-destination)
((cider-clojure-major-mode-p) 'clj)
(cider-repl-type))))