Function: cider-switch-to-last-clojure-buffer
cider-switch-to-last-clojure-buffer is an interactive and
byte-compiled function defined in cider-mode.el.
Signature
(cider-switch-to-last-clojure-buffer)
Documentation
Switch to the last Clojure buffer.
The default keybinding for this command is
the same as variable cider-switch-to-repl-buffer,
so that it is very convenient to jump between a
Clojure buffer and the REPL buffer.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-mode.el
(defun cider-switch-to-last-clojure-buffer ()
"Switch to the last Clojure buffer.
The default keybinding for this command is
the same as variable `cider-switch-to-repl-buffer',
so that it is very convenient to jump between a
Clojure buffer and the REPL buffer."
(interactive)
(if (derived-mode-p 'cider-repl-mode)
(let* ((a-buf)
(the-buf (let ((repl-type (cider-repl-type-for-buffer)))
(seq-find (lambda (b)
(unless (with-current-buffer b (derived-mode-p 'cider-repl-mode))
(when-let* ((type (cider-repl-type-for-buffer b)))
(unless a-buf
(setq a-buf b))
(or (eq type 'multi)
(eq type repl-type)))))
(buffer-list)))))
(if-let* ((buf (or the-buf a-buf)))
(if cider-repl-display-in-current-window
(pop-to-buffer-same-window buf)
(pop-to-buffer buf))
(user-error "No Clojure buffer found")))
(user-error "Not in a CIDER REPL buffer")))