Function: erc-cmd-CLEAR

erc-cmd-CLEAR is a byte-compiled function defined in erc.el.gz.

Signature

(erc-cmd-CLEAR)

Documentation

Clear messages in current buffer after informing active modules.

Expect modules to perform housekeeping tasks to withstand the disruption. When called from Lisp code, only clear messages up to but not including the one occupying the current line.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc-cmd-CLEAR ()
  "Clear messages in current buffer after informing active modules.
Expect modules to perform housekeeping tasks to withstand the
disruption.  When called from Lisp code, only clear messages up
to but not including the one occupying the current line."
  (with-silent-modifications
    (let ((max (if (>= (point) erc-insert-marker)
                   (1- erc-insert-marker)
                 (or (erc--get-inserted-msg-beg (point)) (pos-bol)))))
      (run-hook-with-args 'erc--pre-clear-functions max)
      (delete-region (point-min) max)))
  t)