From: okazaki Date: Sun, 1 Oct 2000 09:45:02 +0000 (+0000) Subject: * elmo-msgdb.el (elmo-living-messages): New function. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=978d9b4bde0489bc8a74ba24cefce85dea63e164;p=elisp%2Fwanderlust.git * elmo-msgdb.el (elmo-living-messages): New function. * elmo-archive.el (elmo-archive-list-folder-subr): Use it. * elmo-cache.el (elmo-cache-list-folder): Ditto. * elmo-dop.el (elmo-dop-list-folder): Ditto. * elmo-imap4.el (elmo-imap4-list-folder): Ditto. * elmo-internal.el (elmo-internal-list-folder-subr): Ditto. * elmo-localdir.el (elmo-localdir-list-folder-subr): Ditto. * elmo-maildir.el (elmo-maildir-list-folder-subr): Ditto. * elmo-multi.el (elmo-multi-list-folder): Ditto. * elmo-nntp.el (elmo-nntp-list-folder): Ditto. * elmo-pipe.el (elmo-pipe-list-folder): Ditto. * elmo-pop3.el (elmo-pop3-list-folder): Ditto. --- diff --git a/elmo/elmo-archive.el b/elmo/elmo-archive.el index c96b003..9f6c2ef 100644 --- a/elmo/elmo-archive.el +++ b/elmo/elmo-archive.el @@ -269,12 +269,7 @@ TYPE specifies the archiver's symbol." (- (length file-list) (length killed)) (length file-list))) (setq numbers (sort file-list '<)) - (if killed - (delq nil - (mapcar (lambda (number) - (unless (memq number killed) number)) - numbers)) - numbers)))) + (elmo-living-messages numbers killed)))) (defun elmo-archive-list-folder (spec) (elmo-archive-list-folder-subr spec)) diff --git a/elmo/elmo-cache.el b/elmo/elmo-cache.el index 9c4e9f2..24ab6c6 100644 --- a/elmo/elmo-cache.el +++ b/elmo/elmo-cache.el @@ -665,12 +665,7 @@ Returning its cache buffer." (elmo-msgdb-expand-path nil spec)))) numbers) (setq numbers (elmo-cache-list-folder-subr spec)) - (if killed - (delq nil - (mapcar (lambda (number) - (unless (memq number killed) number)) - numbers)) - numbers))) + (elmo-living-messages numbers killed))) (defun elmo-cache-max-of-folder (spec) (elmo-cache-list-folder-subr spec t)) diff --git a/elmo/elmo-dop.el b/elmo/elmo-dop.el index 8180a30..2b32066 100644 --- a/elmo/elmo-dop.el +++ b/elmo/elmo-dop.el @@ -301,12 +301,7 @@ even an operation concerns the unplugged folder." (append number-list (list (+ max-num i 1)))) (setq i (+ 1 i))) - (if killed - (delq nil - (mapcar (lambda (number) - (unless (memq number killed) number)) - number-list)) - number-list)) + (elmo-living-messages number-list killed)) (error "Unplugged")) ;; not imap4 folder...list folder (elmo-call-func folder "list-folder"))) diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index 3d8979b..7d38d16 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -723,12 +723,7 @@ BUFFER must be a single-byte buffer." (elmo-msgdb-expand-path nil spec)))) numbers) (setq numbers (elmo-imap4-list spec "all")) - (if killed - (delq nil - (mapcar (lambda (number) - (unless (memq number killed) number)) - numbers)) - numbers))) + (elmo-living-messages numbers killed))) (defun elmo-imap4-list-folder-unread (spec msgdb unread-marks) (if (elmo-imap4-use-flag-p spec) diff --git a/elmo/elmo-internal.el b/elmo/elmo-internal.el index 1d69b68..4288b66 100644 --- a/elmo/elmo-internal.el +++ b/elmo/elmo-internal.el @@ -46,12 +46,7 @@ (- (length flist) (length killed)) (length flist))) (setq numbers (sort flist '<)) - (if killed - (delq nil - (mapcar (lambda (number) - (unless (memq number killed) number)) - numbers)) - numbers)))) + (elmo-living-messages numbers killed)))) (defun elmo-internal-list-folder (spec) (elmo-internal-list-folder-subr spec)) diff --git a/elmo/elmo-localdir.el b/elmo/elmo-localdir.el index c7865e2..9e05370 100644 --- a/elmo/elmo-localdir.el +++ b/elmo/elmo-localdir.el @@ -229,12 +229,7 @@ (- (length flist) (length killed)) (length flist))) (setq numbers (sort flist '<)) - (if killed - (delq nil - (mapcar (lambda (number) - (unless (memq number killed) number)) - numbers)) - numbers)))) + (elmo-living-messages numbers killed)))) (defun elmo-localdir-append-msg (spec string &optional msg no-see) (let ((dir (elmo-localdir-get-folder-directory spec)) diff --git a/elmo/elmo-maildir.el b/elmo/elmo-maildir.el index 7f44835..54983bf 100644 --- a/elmo/elmo-maildir.el +++ b/elmo/elmo-maildir.el @@ -363,12 +363,7 @@ file name for maildir directories." (- (length flist) (length killed)) (length flist)))) (setq numbers (sort flist '<)) - (if killed - (delq nil - (mapcar (lambda (number) - (unless (memq number killed) number)) - numbers)) - numbers)))) + (elmo-living-messages numbers killed)))) (defun elmo-maildir-list-folder (spec) (elmo-maildir-update-current spec) diff --git a/elmo/elmo-msgdb.el b/elmo/elmo-msgdb.el index f9f28ac..b8f0c8e 100644 --- a/elmo/elmo-msgdb.el +++ b/elmo/elmo-msgdb.el @@ -582,6 +582,14 @@ content of MSGDB is changed." (nconc (elmo-msgdb-killed-list-load dir) msgs)))) +(defun elmo-living-messages (messages killed-list) + (if killed-list + (delq nil + (mapcar (lambda (number) + (unless (memq number killed-list) number)) + messages)) + messages)) + (defun elmo-msgdb-finfo-load () (elmo-object-load (expand-file-name elmo-msgdb-finfo-filename diff --git a/elmo/elmo-multi.el b/elmo/elmo-multi.el index 06bf4fe..4d1a4c0 100644 --- a/elmo/elmo-multi.el +++ b/elmo/elmo-multi.el @@ -241,12 +241,7 @@ (* elmo-multi-divide-number cur-number) x))) (elmo-list-folder (car flds))))) (setq flds (cdr flds))) - (if killed - (delq nil - (mapcar (lambda (number) - (unless (memq number killed) number)) - numbers)) - numbers))) + (elmo-living-messages numbers killed))) (defun elmo-multi-folder-exists-p (spec) (let* ((flds (cdr spec))) diff --git a/elmo/elmo-nntp.el b/elmo/elmo-nntp.el index 6f690f6..e9a6e0c 100644 --- a/elmo/elmo-nntp.el +++ b/elmo/elmo-nntp.el @@ -499,12 +499,7 @@ Don't cache if nil.") (setq numbers (elmo-nntp-make-msglist (elmo-match-string 2 response) (elmo-match-string 3 response))))) - (if killed - (delq nil - (mapcar (lambda (number) - (unless (memq number killed) number)) - numbers)) - numbers))))) + (elmo-living-messages numbers killed))))) (defun elmo-nntp-max-of-folder (spec) (let* ((port (elmo-nntp-spec-port spec)) diff --git a/elmo/elmo-pipe.el b/elmo/elmo-pipe.el index fce64b7..a442fe9 100644 --- a/elmo/elmo-pipe.el +++ b/elmo/elmo-pipe.el @@ -82,12 +82,7 @@ (elmo-msgdb-expand-path nil spec)))) numbers) (setq numbers (elmo-list-folder (elmo-pipe-spec-dst spec))) - (if killed - (delq nil - (mapcar (lambda (number) - (unless (memq number killed) number)) - numbers)) - numbers))) + (elmo-living-messages numbers killed))) (defun elmo-pipe-list-folder-unread (spec msgdb unread-marks) (elmo-list-folder-unread (elmo-pipe-spec-dst spec) diff --git a/elmo/elmo-pop3.el b/elmo/elmo-pop3.el index dc10193..5378d6a 100644 --- a/elmo/elmo-pop3.el +++ b/elmo/elmo-pop3.el @@ -482,12 +482,7 @@ (progn (elmo-pop3-list-by-uidl-subr spec)) (elmo-pop3-list-by-list spec))) - (if killed - (delq nil - (mapcar (lambda (number) - (unless (memq number killed) number)) - numbers)) - numbers))) + (elmo-living-messages numbers killed))) (defun elmo-pop3-max-of-folder (spec) (elmo-pop3-commit spec)