Function: erc-button-add-nickname-buttons
erc-button-add-nickname-buttons is a byte-compiled function defined in
erc-button.el.gz.
Signature
(erc-button-add-nickname-buttons ENTRY)
Documentation
Search through the buffer for nicknames, and add buttons.
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-button.el.gz
(defun erc-button-add-nickname-buttons (entry)
"Search through the buffer for nicknames, and add buttons."
(let ((form (nth 2 entry))
(fun (nth 3 entry))
bounds word)
(when (or (eq t form)
(eval form t))
(goto-char (point-min))
(while (erc-forward-word)
(when (setq bounds (erc-bounds-of-word-at-point))
(setq word (buffer-substring-no-properties
(car bounds) (cdr bounds)))
(when (or (and (erc-server-buffer-p) (erc-get-server-user word))
(and erc-channel-users (erc-get-channel-user word)))
(erc-button-add-button (car bounds) (cdr bounds)
fun t (list word))))))))