Function: cider-scratch-find-or-create-buffer

cider-scratch-find-or-create-buffer is a byte-compiled function defined in cider-scratch.el.

Signature

(cider-scratch-find-or-create-buffer &optional REPL)

Documentation

Find or create the scratch buffer attached to REPL's session.

With no REPL, use the session-less scratch buffer.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260822.1520/cider-scratch.el
(defun cider-scratch-find-or-create-buffer (&optional repl)
  "Find or create the scratch buffer attached to REPL's session.
With no REPL, use the session-less scratch buffer."
  (let* ((session-name (when (buffer-live-p repl)
                         (sesman-session-name-for-object 'CIDER repl 'no-error)))
         (name (cider-scratch--buffer-name session-name)))
    (or (get-buffer name)
        (cider-scratch--create-buffer name repl))))