+2000-07-20 Kenichi OKADA <okada@opaopa.org>
+
+ * elmo-pop3.el (elmo-pop3-commit): Do nothing when unplugged.
+ * elmo-imap4.el (elmo-imap4-commit): Ditto.
+
2000-07-18 Yuuichi Teranishi <teranisi@gohome.org>
* elmo-pop3.el (elmo-pop3-use-uidl): New variable.
(elmo-imap4-read-response buffer process))))
(defun elmo-imap4-commit (spec)
- (save-excursion
- (let ((connection (elmo-imap4-get-connection spec))
- response ret-val beg end)
- (and (not (null (elmo-imap4-spec-mailbox spec)))
- (if (not (string= (elmo-imap4-connection-get-cwf connection)
- (elmo-imap4-spec-mailbox spec)))
- (if (null (setq response
- (elmo-imap4-select-folder
- (elmo-imap4-spec-mailbox spec)
- connection)))
- (error "Select folder failed"))
- (if elmo-imap4-use-select-to-update-status
- (elmo-imap4-select-folder
- (elmo-imap4-spec-mailbox spec)
- connection)
- (elmo-imap4-check connection)))))))
+ (if (elmo-plugged-p (elmo-imap4-spec-hostname spec)
+ (elmo-imap4-spec-port spec))
+ (save-excursion
+ (let ((connection (elmo-imap4-get-connection spec))
+ response ret-val beg end)
+ (and (not (null (elmo-imap4-spec-mailbox spec)))
+ (if (not (string= (elmo-imap4-connection-get-cwf connection)
+ (elmo-imap4-spec-mailbox spec)))
+ (if (null (setq response
+ (elmo-imap4-select-folder
+ (elmo-imap4-spec-mailbox spec)
+ connection)))
+ (error "Select folder failed"))
+ (if elmo-imap4-use-select-to-update-status
+ (elmo-imap4-select-folder
+ (elmo-imap4-spec-mailbox spec)
+ connection)
+ (elmo-imap4-check connection))))))))
(defun elmo-imap4-check (connection)
(let ((process (elmo-imap4-connection-get-process connection)))
'elmo-generic-list-folder-important)
(defun elmo-pop3-commit (spec)
- (elmo-pop3-close-connection
- (elmo-pop3-get-connection spec 'if-exists)))
+ (if (elmo-plugged-p (elmo-pop3-spec-hostname spec) (elmo-pop3-spec-port spec))
+ (elmo-pop3-close-connection
+ (elmo-pop3-get-connection spec 'if-exists))))
(provide 'elmo-pop3)