Function: cider-set-repl-type
cider-set-repl-type is an interactive and byte-compiled function
defined in cider-connection.el.
Signature
(cider-set-repl-type &optional TYPE)
Documentation
Set REPL TYPE to clj or cljs.
Assume that the current buffer is a REPL.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-connection.el
(defun cider-set-repl-type (&optional type)
"Set REPL TYPE to clj or cljs.
Assume that the current buffer is a REPL."
(interactive)
(let ((type (cider-maybe-intern (or type (completing-read
(format "Set REPL type (currently `%s') to: "
cider-repl-type)
'(clj cljs))))))
(when (or (not (equal cider-repl-type type))
(null mode-name))
(setq cider-repl-type type)
(setq mode-name (format "REPL[%s]" type))
(let ((params (cider--gather-connect-params)))
;; We need to set current name to something else temporarily to avoid
;; false name duplication in `nrepl-repl-buffer-name`.
(rename-buffer (generate-new-buffer-name "*dummy-cider-repl-buffer*"))
(rename-buffer (nrepl-repl-buffer-name params))
(when (and nrepl-log-messages nrepl-messages-buffer)
(with-current-buffer nrepl-messages-buffer
(rename-buffer (nrepl-messages-buffer-name params))))))))