From 3e35bd5d7e240cc009ae59e6e5c3230352d73900 Mon Sep 17 00:00:00 2001 From: teranisi Date: Thu, 7 Aug 2003 12:58:38 +0000 Subject: [PATCH] * elmo-msgdb.el (elmo-msgdb-list-messages): If argument is a string, use it as a the path for loading message entities. * elmo-dop.el (elmo-folder-status-dop): Use elmo-msgdb-list-messages. --- elmo/ChangeLog | 7 +++++++ elmo/elmo-dop.el | 13 ++++++------- elmo/elmo-msgdb.el | 10 +++++++--- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index e3f6e3b..8fcbe43 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,10 @@ +2003-08-07 Yuuichi Teranishi + + * elmo-msgdb.el (elmo-msgdb-list-messages): If argument is a string, + use it as a the path for loading message entities. + + * elmo-dop.el (elmo-folder-status-dop): Use elmo-msgdb-list-messages. + 2003-08-05 Yuuichi Teranishi * elmo-filter.el (elmo-folder-set-message-modified): Set diff --git a/elmo/elmo-dop.el b/elmo/elmo-dop.el index fda2f92..bbacd0a 100644 --- a/elmo/elmo-dop.el +++ b/elmo/elmo-dop.el @@ -286,13 +286,12 @@ FOLDER is the folder structure." ;;; Execute as subsutitute for plugged operation. (defun elmo-folder-status-dop (folder) - (let* ((number-alist (elmo-msgdb-number-load - (elmo-folder-msgdb-path folder))) - (number-list (mapcar 'car number-alist)) - (spool-folder (elmo-dop-spool-folder folder)) - spool-length - (i 0) - max-num) + (let ((number-list (elmo-msgdb-list-messages + (elmo-folder-msgdb-path folder))) + (spool-folder (elmo-dop-spool-folder folder)) + spool-length + (i 0) + max-num) (setq spool-length (or (car (if (elmo-folder-exists-p spool-folder) (elmo-folder-status spool-folder))) 0)) (setq max-num diff --git a/elmo/elmo-msgdb.el b/elmo/elmo-msgdb.el index afac3db..2fab9a8 100644 --- a/elmo/elmo-msgdb.el +++ b/elmo/elmo-msgdb.el @@ -181,10 +181,14 @@ (elmo-msgdb-make-index msgdb) msgdb)) -(defun elmo-msgdb-list-messages (msgdb) - "List message numbers in the MSGDB." +(defun elmo-msgdb-list-messages (msgdb-or-path) + "Return a list of message numbers in the msgdb. +If MSGDB-OR-PATH is a msgdb structure, use it as a msgdb. +If argument is a string, use it as a path to load message entities." (mapcar 'elmo-msgdb-overview-entity-get-number - (elmo-msgdb-get-overview msgdb))) + (if (stringp msgdb) + (elmo-msgdb-overview-load msgdb) + (elmo-msgdb-get-overview msgdb)))) (defsubst elmo-msgdb-get-mark (msgdb number) "Get mark string from MSGDB which corresponds to the message with NUMBER." -- 1.7.10.4