Function: cider-repl-history-insert-as-one-line

cider-repl-history-insert-as-one-line is a byte-compiled function defined in cider-repl-history.el.

Signature

(cider-repl-history-insert-as-one-line ITEMS)

Documentation

Insert ITEMS into the current buffer, formatting each item as a single line.

An explicit newline character will replace newlines so that the text retains its spacing when it's actually inserted into the REPL buffer.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-repl-history.el
(defun cider-repl-history-insert-as-one-line (items)
  "Insert ITEMS into the current buffer, formatting each item as a single line.

An explicit newline character will replace newlines so that the text retains its
spacing when it's actually inserted into the REPL buffer."
  (dolist (item items)
    (cider-repl-history-add-overlays-for
     item
     (let* ((item (cider-repl-history-elide item))
            (len (length item))
            (start 0)
            (newl (propertize "\\n" 'cider-repl-history-extra t)))
       (while (and (< start len)
                   (string-match "\n" item start))
         (insert (substring item start (match-beginning 0))
                 newl)
         (setq start (match-end 0)))
       (insert (substring item start len))))
    (insert "\n")))