+2006-11-05 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * elmo-imap4.el (elmo-imap4-session-capable-p): New macro.
+ (elmo-imap4-send-command): Use it.
+ (elmo-network-initialize-session): Ditto.
+ (elmo-network-setup-session): Ditto.
+ (elmo-folder-msgdb-create-plugged): Ditto.
+
2006-11-04 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
* elmo-util.el (elmo-progress-done): Fix a miss refer to
(capability current-mailbox read-only flags))
(luna-define-internal-accessors 'elmo-imap4-session))
+(defmacro elmo-imap4-session-capable-p (session capability)
+ `(memq ,capability (elmo-imap4-session-capability-internal ,session)))
+
;;; MIME-ELMO-IMAP Location
(eval-and-compile
(luna-define-class mime-elmo-imap-location
cmdstr
(elmo-imap4-format-quoted (nth 1 token)))))
((eq kind 'literal)
- (if (memq 'literal+
- (elmo-imap4-session-capability-internal
- session))
+ (if (elmo-imap4-session-capable-p session 'literal+)
;; rfc2088
(progn
(setq cmdstr (concat cmdstr
(when (eq (elmo-network-stream-type-symbol
(elmo-network-session-stream-type-internal session))
'starttls)
- (or (memq 'starttls
- (elmo-imap4-session-capability-internal session))
+ (or (elmo-imap4-session-capable-p session 'starttls)
(signal 'elmo-open-error
'(elmo-imap4-starttls-error)))
(elmo-imap4-send-command-wait session "starttls")
(luna-define-method elmo-network-setup-session ((session
elmo-imap4-session))
(with-current-buffer (elmo-network-session-buffer session)
- (when (memq 'namespace (elmo-imap4-session-capability-internal session))
+ (when (elmo-imap4-session-capable-p session 'namespace)
(setq elmo-imap4-server-namespace
(elmo-imap4-response-value
(elmo-imap4-send-command-wait session "namespace")
(total 0)
print-length print-depth
rfc2060 set-list)
- (setq rfc2060 (memq 'imap4rev1
- (elmo-imap4-session-capability-internal
- session)))
+ (setq rfc2060 (elmo-imap4-session-capable-p session 'imap4rev1))
(elmo-with-progress-display (elmo-folder-msgdb-create (length numbers))
"Creating msgdb"
(elmo-imap4-session-select-mailbox