Function: erc-replace-insert
erc-replace-insert is a byte-compiled function defined in
erc-replace.el.gz.
Signature
(erc-replace-insert)
Documentation
Function to run from erc-insert-modify-hook.
It replaces text according to erc-replace-alist.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-replace.el.gz
(defun erc-replace-insert ()
"Function to run from `erc-insert-modify-hook'.
It replaces text according to `erc-replace-alist'."
(mapcar (lambda (elt)
(goto-char (point-min))
(let ((from (car elt))
(to (cdr elt)))
(unless (stringp from)
(setq from (eval from t)))
(while (re-search-forward from nil t)
(cond ((stringp to)
(replace-match to))
((functionp to)
(replace-match (funcall to (match-string 0))))
(t
(eval to t))))))
erc-replace-alist))