Function: cider-find-and-clear-repl-output

cider-find-and-clear-repl-output is an interactive and byte-compiled function defined in cider-mode.el.

Signature

(cider-find-and-clear-repl-output &optional CLEAR-REPL)

Documentation

Find the current REPL buffer and clear it.

With a prefix argument CLEAR-REPL the command clears the entire REPL buffer. Returns to the buffer in which the command was invoked. See also the related commands cider-repl-clear-buffer and cider-repl-clear-output.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-mode.el
(defun cider-find-and-clear-repl-output (&optional clear-repl)
  "Find the current REPL buffer and clear it.
With a prefix argument CLEAR-REPL the command clears the entire REPL
buffer.  Returns to the buffer in which the command was invoked.  See also
the related commands `cider-repl-clear-buffer' and
`cider-repl-clear-output'."
  (interactive "P")
  (let ((origin-buffer (current-buffer)))
    (switch-to-buffer (cider-current-repl 'infer 'ensure))
    (if clear-repl
        (cider-repl-clear-buffer)
      (cider-repl-clear-output))
    (switch-to-buffer origin-buffer)))