(wl-folder-check-one-entity): Simplify.
authorhmurata <hmurata>
Fri, 1 Sep 2006 15:33:52 +0000 (15:33 +0000)
committerhmurata <hmurata>
Fri, 1 Sep 2006 15:33:52 +0000 (15:33 +0000)
wl/ChangeLog
wl/wl-folder.el

index 6296dfb..b190774 100644 (file)
@@ -1,3 +1,7 @@
+2006-09-01  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * wl-folder.el (wl-folder-check-one-entity): Simplify.
+
 2006-08-28  Yoichi NAKAYAMA  <yoichi@geiin.org>
 
        * wl-message.el (wl-message-buffer-prefetch-timer): Removed unused
index 91d52ab..1385b0c 100644 (file)
@@ -865,19 +865,16 @@ Optional argument ARG is repeart count."
                     (if (wl-string-match-member entity wl-strict-diff-folders)
                         (elmo-strict-folder-diff folder)
                       (elmo-folder-diff folder)))
+                (elmo-open-error
+                 (signal (car err) (cdr err)))
                 (error
                  ;; maybe not exist folder.
-                 (if (and (not (or (memq 'elmo-open-error
-                                         (get (car err) 'error-conditions))
-                                   (memq 'elmo-imap4-bye-error
-                                         (get (car err) 'error-conditions))))
-                          (not (elmo-folder-exists-p folder)))
+                 (if (not (elmo-folder-exists-p folder))
                      (wl-folder-create-subr folder)
                    (signal (car err) (cdr err))))))
         (new    (elmo-diff-new nums))
         (unread (elmo-diff-unread nums))
-        (all    (elmo-diff-all nums))
-        unsync nomif)
+        (all    (elmo-diff-all nums)))
     (if (and (eq wl-folder-notify-deleted 'sync)
             (or (and new    (> 0 new))
                 (and unread (> 0 unread))
@@ -892,10 +889,11 @@ Optional argument ARG is repeart count."
        (setq new    (and new    (max 0 new))
              unread (and unread (max 0 unread))
              all    (and all    (max 0 all))))
-      (setq unread (or (and unread (- unread (or new 0)))
-                      (elmo-folder-get-info-unread folder)
-                      (or (cdr (assq 'unread
-                                     (elmo-folder-count-flags folder))) 0)))
+      (setq unread (if unread
+                      (- unread (or new 0))
+                    (or (elmo-folder-get-info-unread folder)
+                        (cdr (assq 'unread (elmo-folder-count-flags folder)))
+                        0)))
       (wl-folder-entity-hashtb-set wl-folder-entity-hashtb entity
                                   (list new unread all)
                                   (get-buffer wl-folder-buffer-name)))