Function: bug-reference-maybe-setup-from-irc

bug-reference-maybe-setup-from-irc is a byte-compiled function defined in bug-reference.el.gz.

Signature

(bug-reference-maybe-setup-from-irc CHANNEL NETWORK)

Documentation

Set up according to IRC CHANNEL or NETWORK.

CHANNEL is an IRC channel name (or generally a target, i.e., it could also be a user name) and NETWORK is that channel's network name.

If any bug-reference-setup-from-irc-alist entry's CHANNEL-REGEXP and NETWORK-REGEXP match CHANNEL and NETWORK, the corresponding BUG-REGEXP and URL-FORMAT are set.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/bug-reference.el.gz
(defun bug-reference-maybe-setup-from-irc (channel network)
  "Set up according to IRC CHANNEL or NETWORK.
CHANNEL is an IRC channel name (or generally a target, i.e., it
could also be a user name) and NETWORK is that channel's network
name.

If any `bug-reference-setup-from-irc-alist' entry's
CHANNEL-REGEXP and NETWORK-REGEXP match CHANNEL and NETWORK, the
corresponding BUG-REGEXP and URL-FORMAT are set."
  (catch 'setup-done
    (dolist (config bug-reference-setup-from-irc-alist)
      (let ((channel-rx (car config))
            (network-rx (nth 1 config)))
        (when (and
               ;; One of both has to be given.
               (or channel-rx network-rx)
               ;; The args have to be set.
               channel network)
          (when (and
                 (or (null channel-rx)
                     (string-match-p channel-rx channel))
                 (or (null network-rx)
                     (string-match-p network-rx network)))
            (setq-local bug-reference-bug-regexp (nth 2 config))
            (setq-local bug-reference-url-format (nth 3 config))
            (throw 'setup-done t)))))))