(follow the API change).
* elmo-filter.el (elmo-folder-count-flags): Ditto.
+2004-08-31 Hiroya Murata <lapis-lazuli@pop06.odn.ne.jp>
+
+ * elmo-multi.el (elmo-folder-count-flags): Changed return value
+ (follow the API change).
+
+ * elmo-filter.el (elmo-folder-count-flags): Ditto.
+
2004-08-31 Yuuichi Teranishi <teranisi@gohome.org>
* modb-standard.el (modb-standard-digest-flags): Abolish.
(elmo-folder-close-flag-table (elmo-filter-folder-target-internal folder)))
(luna-define-method elmo-folder-count-flags ((folder elmo-filter-folder))
- (let* ((flag-count (elmo-filter-folder-flag-count folder))
- (new (or (cdr (assq 'new flag-count)) 0))
- (unread (or (cdr (assq 'unread flag-count)) 0))
- (answered(or (cdr (assq 'answered flag-count)) 0)))
- (list new (- unread new) answered)))
+ (elmo-filter-folder-flag-count folder))
(luna-define-method elmo-folder-set-flag ((folder elmo-filter-folder)
numbers
sum))
(luna-define-method elmo-folder-count-flags ((folder elmo-multi-folder))
- (let ((new 0)
- (unreads 0)
- (answered 0)
- flags)
+ (let (flag-alist element)
(dolist (child (elmo-multi-folder-children-internal folder))
- (setq flags (elmo-folder-count-flags child))
- (setq new (+ new (nth 0 flags)))
- (setq unreads (+ unreads (nth 1 flags)))
- (setq answered (+ answered (nth 2 flags))))
- (list new unreads answered)))
+ (dolist (pair (elmo-folder-count-flags child))
+ (if (setq element (assq (car pair) flag-alist))
+ (setcdr element (+ (cdr element) (cdr pair)))
+ (setq flag-alist (cons pair flag-alist)))))
+ flag-alist))
(require 'product)
(product-provide (provide 'elmo-multi) (require 'elmo-version))