(luna-define-internal-accessors 'mime-elmo-imap-location))
;;; Debug
-(defsubst elmo-imap4-debug (message &rest args)
- (if elmo-imap4-debug
- (with-current-buffer (get-buffer-create "*IMAP4 DEBUG*")
- (goto-char (point-max))
- (if elmo-imap4-debug-inhibit-logging
- (insert "NO LOGGING\n")
- (insert (apply 'format message args) "\n")))))
+(defmacro elmo-imap4-debug (message &rest args)
+ (` (if elmo-imap4-debug
+ (elmo-imap4-debug-1 (, message) (,@ args)))))
+
+(defun elmo-imap4-debug-1 (message &rest args)
+ (with-current-buffer (get-buffer-create "*IMAP4 DEBUG*")
+ (goto-char (point-max))
+ (if elmo-imap4-debug-inhibit-logging
+ (insert "NO LOGGING\n")
+ (insert (apply 'format message args) "\n"))))
(defsubst elmo-imap4-decode-folder-string (string)
(if elmo-imap4-use-modified-utf7
(signal 'elmo-open-error
'(elmo-imap4-starttls-error)))
(elmo-imap4-send-command-wait session "starttls")
- (starttls-negotiate process)))))
+ (starttls-negotiate process)
+ (elmo-imap4-session-set-capability-internal
+ session
+ (elmo-imap4-response-value
+ (elmo-imap4-send-command-wait session "capability")
+ 'capability))))))
(luna-define-method elmo-network-authenticate-session ((session
elmo-imap4-session))
(message
"Unknown status data %s in mailbox %s ignored"
token mailbox))))
- status))))
+ status))
+ (skip-chars-forward " ")))
(and elmo-imap4-status-callback
(funcall elmo-imap4-status-callback
status
(setq parse (elmo-parse-token name ":"))
(elmo-imap4-folder-set-mailbox-internal folder
(elmo-imap4-encode-folder-string
- (if (eq (length (car parse)) 0)
- elmo-imap4-default-mailbox
- (car parse))))
+ (car parse)))
;; user
(setq parse (elmo-parse-prefixed-element ?: (cdr parse) "/"))
(elmo-net-folder-set-user-internal folder
(unless elmo-inhibit-display-retrieval-progress
(elmo-display-progress 'elmo-imap4-display-literal-progress
"Retrieving..." 100) ; remove progress bar.
- (message "Retrieving...done."))
+ (message "Retrieving...done"))
(if (setq response (elmo-imap4-response-bodydetail-text
(elmo-imap4-response-value-all
response 'fetch)))