Function: erc-networks--examine-targets

erc-networks--examine-targets is a byte-compiled function defined in erc-networks.el.gz.

Signature

(erc-networks--examine-targets IDENTITY TARGET ON-DUPE ON-COLLISION)

Documentation

Visit all ERC target buffers with the same TARGET.

Call ON-DUPE when a buffer's identity belongs to a network IDENTITY or "should" after reconciliation. Call ON-COLLISION otherwise. Neither function should accept any args. Expect TARGET to be an erc--target object.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc-networks.el.gz
(defun erc-networks--examine-targets (identity target on-dupe on-collision)
  "Visit all ERC target buffers with the same TARGET.
Call ON-DUPE when a buffer's identity belongs to a network
IDENTITY or \"should\" after reconciliation.  Call ON-COLLISION
otherwise.  Neither function should accept any args. Expect
TARGET to be an `erc--target' object."
  (declare (indent 2))
  (let ((announced erc-server-announced-name))
    (erc-buffer-filter
     (lambda ()
       (when (and erc--target (eq (erc--target-symbol erc--target)
                                  (erc--target-symbol target)))
         (let ((oursp (if (erc--target-channel-local-p target)
                          (equal announced erc-server-announced-name)
                        (erc-networks--id-equal-p identity erc-networks--id))))
           (funcall (if oursp on-dupe on-collision))))))))