- (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))