Function: erc-get-buffer

erc-get-buffer is a byte-compiled function defined in erc.el.gz.

Signature

(erc-get-buffer TARGET &optional PROC)

Documentation

Return the buffer matching TARGET in the process PROC.

Without PROC, search all ERC buffers. For historical reasons, skip buffers for channels the client has "PART"ed or from which it's been "KICK"ed. Expect users to use a different function for finding targets independent of "JOIN"edness.

Source Code

;; Defined in /usr/src/emacs/lisp/erc/erc.el.gz
(defun erc-get-buffer (target &optional proc)
  "Return the buffer matching TARGET in the process PROC.
Without PROC, search all ERC buffers.  For historical reasons,
skip buffers for channels the client has \"PART\"ed or from which
it's been \"KICK\"ed.  Expect users to use a different function
for finding targets independent of \"JOIN\"edness."
  (let ((downcased-target (erc-downcase target)))
    (catch 'buffer
      (erc-buffer-filter
       (lambda ()
         (let ((current (erc-default-target)))
           (and (stringp current)
                (string-equal downcased-target (erc-downcase current))
                (throw 'buffer (current-buffer)))))
       proc))))