From f7e1b3f407eb0e3a70d6de266e28de96eb01f93a Mon Sep 17 00:00:00 2001 From: teranisi Date: Sat, 23 Aug 2003 08:04:57 +0000 Subject: [PATCH] * elmo-multi.el (elmo-message-entity-parent): Define. (elmo-folder-search): Rewrite. --- elmo/ChangeLog | 5 +++++ elmo/elmo-multi.el | 46 +++++++++++++++++++++++----------------------- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index f12a0ec..4166a90 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2003-08-23 Yuuichi Teranishi + + * elmo-multi.el (elmo-message-entity-parent): Define. + (elmo-folder-search): Rewrite. + 2003-08-22 Hiroya Murata * elmo-multi.el (elmo-message-cached-p): Define. diff --git a/elmo/elmo-multi.el b/elmo/elmo-multi.el index e9fb8c6..78c5d84 100644 --- a/elmo/elmo-multi.el +++ b/elmo/elmo-multi.el @@ -174,6 +174,12 @@ (setq children (cdr children))) match)))) +(luna-define-method elmo-message-entity-parent ((folder + elmo-multi-folder) entity) + (elmo-message-entity + folder + (elmo-message-entity-field entity 'references))) + (luna-define-method elmo-message-field ((folder elmo-multi-folder) number field) (let ((pair (elmo-multi-real-folder-number folder number))) @@ -367,34 +373,28 @@ t))) (luna-define-method elmo-folder-search ((folder elmo-multi-folder) - condition &optional numlist) + condition &optional numbers) (let* ((flds (elmo-multi-folder-children-internal folder)) (cur-number 0) - numlist-list cur-numlist ; for filtered search. - ret-val) - (if numlist - (setq numlist-list - (elmo-multi-split-numbers folder numlist t))) + numlist + matches) + (setq numbers (or numbers + (elmo-folder-list-messages folder))) (while flds (setq cur-number (+ cur-number 1)) - (when numlist - (setq cur-numlist (car numlist-list))) - (setq ret-val (append - ret-val - (elmo-list-filter - cur-numlist - (mapcar - (function - (lambda (x) - (+ - (* (elmo-multi-folder-divide-number-internal - folder) cur-number) x))) - (elmo-folder-search - (car flds) condition))))) - (when numlist - (setq numlist-list (cdr numlist-list))) + (setq matches (append matches + (mapcar + (function + (lambda (x) + (+ + (* (elmo-multi-folder-divide-number-internal + folder) + cur-number) + x))) + (elmo-folder-search + (car flds) condition)))) (setq flds (cdr flds))) - ret-val)) + (elmo-list-filter numbers matches))) (luna-define-method elmo-message-use-cache-p ((folder elmo-multi-folder) number) -- 1.7.10.4