Function: cider-repl-emit-result

cider-repl-emit-result is a byte-compiled function defined in cider-repl.el.

Signature

(cider-repl-emit-result BUFFER STRING SHOW-PREFIX &optional BOL)

Documentation

Emit into BUFFER the result STRING and mark it as an evaluation result.

If SHOW-PREFIX is non-nil insert cider-repl-result-prefix at the beginning of the line. If BOL is non-nil insert at the beginning of the line.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-repl.el
(defun cider-repl-emit-result (buffer string show-prefix &optional bol)
  "Emit into BUFFER the result STRING and mark it as an evaluation result.
If SHOW-PREFIX is non-nil insert `cider-repl-result-prefix' at the beginning
of the line.  If BOL is non-nil insert at the beginning of the line."
  (with-current-buffer buffer
    (save-excursion
      (cider-save-marker cider-repl-output-start
        (goto-char cider-repl-output-end)
        (when (and bol (not (bolp)))
          (insert-before-markers "\n"))
        (when show-prefix
          (insert-before-markers (propertize cider-repl-result-prefix 'font-lock-face 'font-lock-comment-face)))
        (if cider-repl-use-clojure-font-lock
            (insert-before-markers (cider-font-lock-as-clojure string))
          (cider-propertize-region
              '(font-lock-face cider-repl-result-face rear-nonsticky (font-lock-face))
            (insert-before-markers string)))))))