Function: erc-button-add-buttons-1

erc-button-add-buttons-1 is a byte-compiled function defined in erc-button.el.gz.

Signature

(erc-button-add-buttons-1 REGEXP ENTRY)

Documentation

Search through the buffer for matches to ENTRY and add buttons.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-button.el.gz
(defun erc-button-add-buttons-1 (regexp entry)
  "Search through the buffer for matches to ENTRY and add buttons."
  (goto-char (point-min))
  (let (buttonizer)
    (while
        (and (re-search-forward regexp nil t)
             (or buttonizer
                 (setq buttonizer
                       (and-let*
                           ((raw-form (nth 2 entry))
                            (res (or (eq t raw-form)
                                     (erc-button--extract-form raw-form))))
                         (if (functionp res) res #'erc-button-add-button)))))
      (let ((start (match-beginning (nth 1 entry)))
            (end (match-end (nth 1 entry)))
            (fun (nth 3 entry))
            (data (mapcar #'match-string-no-properties (nthcdr 4 entry))))
        (funcall buttonizer start end fun nil data regexp)))))