Function: erc-fill
erc-fill is an autoloaded and byte-compiled function defined in
erc-fill.el.gz.
Signature
(erc-fill)
Documentation
Fill a region using the function referenced in erc-fill-function.
You can put this on erc-insert-modify-hook and/or erc-send-modify-hook.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-fill.el.gz
;;;###autoload
(defun erc-fill ()
"Fill a region using the function referenced in `erc-fill-function'.
You can put this on `erc-insert-modify-hook' and/or `erc-send-modify-hook'."
(unless (erc-string-invisible-p (buffer-substring (point-min) (point-max)))
(when (or erc-fill--function erc-fill-function)
;; skip initial empty lines
(goto-char (point-min))
;; Note the following search pattern was altered in 5.6 to adapt
;; to a change in Emacs regexp behavior that turned out to be a
;; regression (which has since been fixed). The patterns appear
;; to be equivalent in practice, so this was left as is (wasn't
;; reverted) to avoid additional git-blame(1)-related churn.
(while (and (looking-at (rx bol (* (in " \t")) eol))
(zerop (forward-line 1))))
(unless (eobp)
(save-restriction
(narrow-to-region (point) (point-max))
(funcall (or erc-fill--function erc-fill-function))
(when-let ((erc-fill-line-spacing)
(p (point-min)))
(widen)
(when (or (erc--check-msg-prop 'erc--spkr)
(save-excursion
(forward-line -1)
(erc--get-inserted-msg-prop 'erc--spkr)))
(put-text-property (1- p) p
'line-spacing erc-fill-line-spacing))))))))