* wl.el (wl-plugged-dop-queue-status): Shrink queue list.
authorteranisi <teranisi>
Thu, 13 Dec 2001 07:17:33 +0000 (07:17 +0000)
committerteranisi <teranisi>
Thu, 13 Dec 2001 07:17:33 +0000 (07:17 +0000)
wl/ChangeLog
wl/wl.el

index 4ccd04a..963557e 100644 (file)
@@ -1,5 +1,7 @@
 2001-12-13  Yuuichi Teranishi  <teranisi@gohome.org>
 
+       * wl.el (wl-plugged-dop-queue-status): Shrink queue list.
+
        * wl-expire.el (wl-folder-expire-entity): Follow the last change on
        wl-summary-save-view.
 
index c4b3c7d..87bef00 100644 (file)
--- a/wl/wl.el
+++ b/wl/wl.el
@@ -308,12 +308,23 @@ Entering Plugged mode calls the value of `wl-plugged-mode-hook'."
                 (car folder-ope)
                 (wl-folder-get-petname (car folder-ope)))
                "("
-               (mapconcat
-                '(lambda (ope)
-                   (if (> (cdr ope) 0)
-                       (format "%s:%d" (car ope) (cdr ope))
-                     (format "%s" (car ope))))
-                (cdr folder-ope) ",")
+               (let ((opes (cdr folder-ope))
+                     pair shrinked)
+                 (while opes
+                   (if (setq pair (assoc (car (car opes)) shrinked))
+                       (setcdr pair (+ (cdr pair)
+                                       (max (cdr (car opes)) 1)))
+                     (setq shrinked (cons
+                                     (cons (car (car opes))
+                                           (max (cdr (car opes)) 1))
+                                     shrinked)))
+                   (setq opes (cdr opes)))
+                 (mapconcat
+                  '(lambda (ope)
+                     (if (> (cdr ope) 0)
+                         (format "%s:%d" (car ope) (cdr ope))
+                       (format "%s" (car ope))))
+                  (nreverse shrinked) ","))
                ")"))
      operations
      (concat "\n" (wl-set-string-width column "")))))