Function: imap-opened
imap-opened is a byte-compiled function defined in imap.el.gz.
Signature
(imap-opened &optional BUFFER)
Documentation
Return non-nil if connection to imap server in BUFFER is open.
If BUFFER is nil then the current buffer is used.
Source Code
;; Defined in /usr/src/emacs/lisp/net/imap.el.gz
(defun imap-opened (&optional buffer)
"Return non-nil if connection to imap server in BUFFER is open.
If BUFFER is nil then the current buffer is used."
(and (setq buffer (get-buffer (or buffer (current-buffer))))
(buffer-live-p buffer)
(with-current-buffer buffer
(and imap-process
(memq (process-status imap-process) '(open run))
(if imap-ping-server
(imap-ping-server)
t)))))