Function: erc--delete-inserted-message-naively

erc--delete-inserted-message-naively is a byte-compiled function defined in erc.el.gz.

Signature

(erc--delete-inserted-message-naively BEG-OR-POINT &optional END)

Documentation

Remove message between BEG and END.

Do this without updating messages on either side even if their appearance was somehow influenced by the newly absent message. Expect BEG and END to match bounds as returned by the function erc--get-inserted-msg-bounds. Ensure all markers residing at the start of the deleted message end up at the beginning of the subsequent message.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc--delete-inserted-message-naively (beg-or-point &optional end)
  "Remove message between BEG and END.
Do this without updating messages on either side even if their
appearance was somehow influenced by the newly absent message.
Expect BEG and END to match bounds as returned by the function
`erc--get-inserted-msg-bounds'.  Ensure all markers residing at
the start of the deleted message end up at the beginning of the
subsequent message."
  (let ((beg beg-or-point))
    (save-restriction
      (widen)
      (unless end
        (setq end (erc--get-inserted-msg-bounds beg-or-point)
              beg (pop end)))
      (with-silent-modifications
        (if erc-legacy-invisible-bounds-p
            (delete-region beg (1+ end))
          (save-excursion
            (goto-char beg)
            (insert-before-markers
             (substring (delete-and-extract-region (1- (point)) (1+ end))
                        -1))))))))