Function: erc-button-add-buttons
erc-button-add-buttons is an interactive and byte-compiled function
defined in erc-button.el.gz.
Signature
(erc-button-add-buttons)
Documentation
Find external references in the current buffer and make buttons of them.
"External references" are things like URLs, as
specified by erc-button-alist.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/erc/erc-button.el.gz
(defun erc-button-add-buttons ()
"Find external references in the current buffer and make buttons of them.
\"External references\" are things like URLs, as
specified by `erc-button-alist'."
(interactive)
(save-excursion
(with-syntax-table erc-button-syntax-table
(let ((buffer-read-only nil)
(inhibit-point-motion-hooks t)
(inhibit-field-text-motion t)
(alist erc-button-alist)
regexp)
(erc-button-remove-old-buttons)
(dolist (entry alist)
(if (equal (car entry) (quote (quote nicknames)))
(erc-button-add-nickname-buttons entry)
(progn
(setq regexp (or (and (stringp (car entry)) (car entry))
(and (boundp (car entry))
(symbol-value (car entry)))))
(cond ((stringp regexp)
(erc-button-add-buttons-1 regexp entry))
((and (listp regexp) (stringp (car regexp)))
(dolist (r regexp)
(erc-button-add-buttons-1
(concat "\\<" (regexp-quote r) "\\>")
entry)))
((and (listp regexp) (listp (car regexp))
(stringp (caar regexp)))
(dolist (elem regexp)
(erc-button-add-buttons-1
(concat "\\<" (regexp-quote (car elem)) "\\>")
entry)))))))))))