From: teranisi Date: Wed, 13 Aug 2003 14:51:40 +0000 (+0000) Subject: * elmo.el (elmo-folder-detach-messages): Don't load msgdb if empty. X-Git-Tag: wl-2_11_8~10 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=8a6a614c4a9ddee91c8ff710dbacd518300853bb;p=elisp%2Fwanderlust.git * elmo.el (elmo-folder-detach-messages): Don't load msgdb if empty. * elmo-pipe.el (elmo-pipe-drain): Bind elmo-inhibit-number-mapping only when src folder type is pop3. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 4845bd0..c4da92b 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,10 @@ +2003-08-13 Yuuichi Teranishi + + * elmo.el (elmo-folder-detach-messages): Don't load msgdb if empty. + + * elmo-pipe.el (elmo-pipe-drain): Bind elmo-inhibit-number-mapping + only when src folder type is pop3. + 2003-08-12 Yuuichi Teranishi * elmo-msgdb.el (elmo-msgdb-make-index): Use diff --git a/elmo/elmo-pipe.el b/elmo/elmo-pipe.el index b387a9f..2840857 100644 --- a/elmo/elmo-pipe.el +++ b/elmo/elmo-pipe.el @@ -105,7 +105,9 @@ (defun elmo-pipe-drain (src dst &optional copy ignore-list) "Move or copy all messages of SRC to DST." - (let ((elmo-inhibit-number-mapping (not copy)) ; No need to use UIDL + (let ((elmo-inhibit-number-mapping (and (eq (elmo-folder-type-internal + src) 'pop3) + (not copy))) ; No need to use UIDL msgs len) (message "Checking %s..." (elmo-folder-name-internal src)) ;; Warnnig: some function requires msgdb diff --git a/elmo/elmo-pop3.el b/elmo/elmo-pop3.el index 201c670..8345095 100644 --- a/elmo/elmo-pop3.el +++ b/elmo/elmo-pop3.el @@ -914,13 +914,13 @@ If IF-EXISTS is `any-exists', get BIFF session or normal session if exists." (error "Deleting message failed"))) (error "Deleting message failed"))))) -(luna-define-method elmo-folder-delete-messages-plugged - ((folder elmo-pop3-folder) msgs) +(luna-define-method elmo-folder-delete-messages-plugged ((folder + elmo-pop3-folder) + msgs) (let ((loc-alist (elmo-pop3-folder-location-alist-internal folder)) (process (elmo-network-session-process-internal (elmo-pop3-get-session folder)))) - (mapcar '(lambda (msg) (elmo-pop3-delete-msg - process msg loc-alist)) + (mapcar '(lambda (msg) (elmo-pop3-delete-msg process msg loc-alist)) msgs))) (luna-define-method elmo-message-use-cache-p ((folder elmo-pop3-folder) number) diff --git a/elmo/elmo.el b/elmo/elmo.el index cb66c79..7a2105d 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -1543,7 +1543,8 @@ If update process is interrupted, return nil.") (luna-define-method elmo-folder-detach-messages ((folder elmo-folder) numbers) - (elmo-msgdb-delete-msgs (elmo-folder-msgdb folder) numbers)) + (if (elmo-folder-msgdb-internal folder) + (elmo-msgdb-delete-msgs (elmo-folder-msgdb folder) numbers))) (luna-define-generic elmo-folder-length (folder) "Return number of messages in the FOLDER.") @@ -1656,7 +1657,6 @@ Return a hashtable for newsgroups." (error "Cannot rename %s folder" (symbol-name (elmo-folder-type-internal folder)))) - ;;; Define folders. (elmo-define-folder ?% 'imap4) (elmo-define-folder ?- 'nntp)