From: teranisi Date: Tue, 27 Feb 2001 10:43:58 +0000 (+0000) Subject: * elmo-maildir.el (elmo-folder-msgdb-create): Fixed. X-Git-Tag: wl-2_8-root^2~17 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6bca666a2fdb8cdac451060a2a31dfb2628485c;p=elisp%2Fwanderlust.git * 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 ) (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'. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 134e43f..ddb5add 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,5 +1,17 @@ 2001-02-27 Yuuichi Teranishi + * 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 ) + (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). diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index 24d9d5f..ae3f20c 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -789,29 +789,13 @@ If CHOP-LENGTH is not specified, message set is not chopped." 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)) @@ -844,6 +828,22 @@ If CHOP-LENGTH is not specified, message set is not chopped." (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 @@ -1492,7 +1492,8 @@ Return nil if no complete line has arrived." (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 () @@ -1789,7 +1790,7 @@ Return nil if no complete line has arrived." 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) @@ -1899,7 +1900,7 @@ Return nil if no complete line has arrived." 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))))) diff --git a/elmo/elmo-maildir.el b/elmo/elmo-maildir.el index 069a88b..1efc523 100644 --- a/elmo/elmo-maildir.el +++ b/elmo/elmo-maildir.el @@ -157,14 +157,15 @@ LOCATION." (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))