Function: nnimap-find-connection

nnimap-find-connection is a byte-compiled function defined in nnimap.el.gz.

Signature

(nnimap-find-connection BUFFER)

Documentation

Find the connection delivering to BUFFER.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/nnimap.el.gz
(defun nnimap-find-connection (buffer)
  "Find the connection delivering to BUFFER."
  (let ((entry (assoc buffer nnimap-connection-alist)))
    (when entry
      (if (and (buffer-live-p (cadr entry))
	       (get-buffer-process (cadr entry))
	       (process-live-p (get-buffer-process (cadr entry))))
	  (get-buffer-process (cadr entry))
	(setq nnimap-connection-alist (delq entry nnimap-connection-alist)
              nnimap-process-buffers
	      (delq (cadr entry) nnimap-process-buffers))
	(when (buffer-live-p (cadr entry))
	  (kill-buffer (cadr entry)))
	nil))))