Function: erc-networks--transplant-buffer-content

erc-networks--transplant-buffer-content is a byte-compiled function defined in erc-networks.el.gz.

Signature

(erc-networks--transplant-buffer-content SRC DEST)

Documentation

Insert buffer SRC's contents into DEST, above its contents.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-networks.el.gz
(defun erc-networks--transplant-buffer-content (src dest)
  "Insert buffer SRC's contents into DEST, above its contents."
  (with-silent-modifications
    (let ((content (with-current-buffer src
                     (cl-assert (not (buffer-narrowed-p)))
                     (erc--insert-admin-message 'graft ?n dest ?o src)
                     (buffer-substring (point-min) erc-insert-marker))))
      (with-current-buffer dest
        (save-excursion
          (save-restriction
            (cl-assert (not (buffer-narrowed-p)))
            (goto-char (point-min))
            (while (and (eql ?\n (char-after (point)))
                        (null (text-properties-at (point))))
              (delete-char 1))
            (insert-before-markers content)))))))