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