2001-02-27 Yuuichi Teranishi <teranisi@gohome.org>
+ * elmo-maildir.el (elmo-folder-msgdb-create): Fixed.
+
+ * elmo-imap4.el (elmo-folder-initialize): Fixed problem
+ when elmo-imap4-default-authenticate-type is nil.
+ (elmo-folder-list-subfolders): Ditto
+ (According to the reported of Bun Mizuhara <mizuhara@acm.org>)
+ (elmo-imap4-fetch-callback-1-subr): Renamed from
+ `elmo-imap4-fetch-callback-1' and define as inline function.
+ (elmo-imap4-fetch-callback-1):
+ Renamed from `elmo-imap4-fetch-callback'.
+ (elmo-imap4-parse-fetch): Funcall `elmo-imap4-fetch-callback'.
+
* elmo-localdir.el (elmo-folder-expand-msgdb-path): Fixed
msgdb path (To keep compatibility with main trunk).
set-list)))
(nreverse set-list)))
-;; Current buffer is process buffer.
-(defun elmo-imap4-fetch-callback (element app-data)
- (funcall elmo-imap4-fetch-callback
- (with-temp-buffer
- (insert (or (elmo-imap4-response-bodydetail-text element)
- ""))
- ;; Delete CR.
- (goto-char (point-min))
- (while (search-forward "\r\n" nil t)
- (replace-match "\n"))
- (elmo-msgdb-create-overview-from-buffer
- (elmo-imap4-response-value element 'uid)
- (elmo-imap4-response-value element 'rfc822size)))
- (elmo-imap4-response-value element 'flags)
- app-data))
-
;;
;; app-data:
;; cons of list
;; 0: new-mark 1: already-mark 2: seen-mark 3: important-mark
;; 4: seen-list
;; and result of use-flag-p.
-(defun elmo-imap4-fetch-callback-1 (entity flags app-data)
+(defsubst elmo-imap4-fetch-callback-1-subr (entity flags app-data)
"A msgdb entity callback function."
(let* ((use-flag (cdr app-data))
(app-data (car app-data))
(list (elmo-msgdb-overview-entity-get-number entity)
mark))))))))
+;; Current buffer is process buffer.
+(defun elmo-imap4-fetch-callback-1 (element app-data)
+ (elmo-imap4-fetch-callback-1-subr
+ (with-temp-buffer
+ (insert (or (elmo-imap4-response-bodydetail-text element)
+ ""))
+ ;; Delete CR.
+ (goto-char (point-min))
+ (while (search-forward "\r\n" nil t)
+ (replace-match "\n"))
+ (elmo-msgdb-create-overview-from-buffer
+ (elmo-imap4-response-value element 'uid)
+ (elmo-imap4-response-value element 'rfc822size)))
+ (elmo-imap4-response-value element 'flags)
+ app-data))
+
(defun elmo-imap4-parse-capability (string)
(if (string-match "^\\*\\(.*\\)$" string)
(elmo-read
(list 'bodystructure (elmo-imap4-parse-body)))))
(setq list (cons element list))))
(and elmo-imap4-fetch-callback
- (elmo-imap4-fetch-callback list elmo-imap4-fetch-callback-data))
+ (funcall elmo-imap4-fetch-callback
+ list elmo-imap4-fetch-callback-data))
(list 'fetch list))))
(defun elmo-imap4-parse-status ()
folder
(if (match-beginning 3)
(intern (elmo-match-substring 3 name 1))
- elmo-imap4-default-authenticate-type))
+ (or elmo-imap4-default-authenticate-type 'clear)))
(unless (elmo-net-folder-server-internal folder)
(elmo-net-folder-set-server-internal folder default-server))
(unless (elmo-net-folder-port-internal folder)
elmo-imap4-default-user)
(setq append-serv (concat ":" (elmo-net-folder-user-internal folder))))
(unless (eq (elmo-net-folder-auth-internal folder)
- elmo-imap4-default-authenticate-type)
+ (or elmo-imap4-default-authenticate-type 'clear))
(setq append-serv
(concat append-serv "/"
(symbol-name (elmo-net-folder-auth-internal folder)))))
(setq mark new-mark)) ; unread!
((member location flagged-list)
(setq mark important-mark)))
- (setq mark-alist
- (elmo-msgdb-mark-append
- mark-alist
- (elmo-msgdb-overview-entity-get-number
- entity)
- (or (elmo-msgdb-global-mark-get
- (elmo-msgdb-overview-entity-get-id
- entity))
+ (if (setq mark (or (elmo-msgdb-global-mark-get
+ (elmo-msgdb-overview-entity-get-id
+ entity))
+ mark))
+ (setq mark-alist
+ (elmo-msgdb-mark-append
+ mark-alist
+ (elmo-msgdb-overview-entity-get-number
+ entity)
mark)))
(when (> len elmo-display-progress-threshold)
(setq i (1+ i))