From: hmurata Date: Fri, 1 Sep 2006 15:33:52 +0000 (+0000) Subject: (wl-folder-check-one-entity): Simplify. X-Git-Tag: wl-2_15_4~4 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=5ab5c3f6a34f93bf2c47a05618e8e5434d96924e;p=elisp%2Fwanderlust.git (wl-folder-check-one-entity): Simplify. --- diff --git a/wl/ChangeLog b/wl/ChangeLog index 6296dfb..b190774 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,7 @@ +2006-09-01 Hiroya Murata + + * wl-folder.el (wl-folder-check-one-entity): Simplify. + 2006-08-28 Yoichi NAKAYAMA * wl-message.el (wl-message-buffer-prefetch-timer): Removed unused diff --git a/wl/wl-folder.el b/wl/wl-folder.el index 91d52ab..1385b0c 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -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)))