* wl-folder.el (wl-folder-check-one-entity): Don't care
authorteranisi <teranisi>
Mon, 21 Jan 2002 09:14:52 +0000 (09:14 +0000)
committerteranisi <teranisi>
Mon, 21 Jan 2002 09:14:52 +0000 (09:14 +0000)
`elmo-folder-use-flag-p'.

* elmo-imap4.el (elmo-imap4-folder-diff-plugged): If unread is
less than new, set new as unread.

* elmo-util.el (elmo-string): Don't put text-property if nil.

elmo/ChangeLog
elmo/elmo-imap4.el
elmo/elmo-util.el
wl/ChangeLog
wl/wl-folder.el

index cddac78..007bec6 100644 (file)
@@ -1,3 +1,10 @@
+2002-01-21  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo-imap4.el (elmo-imap4-folder-diff-plugged): If unread is
+       less than new, set new as unread.
+
+       * elmo-util.el (elmo-string): Don't put text-property if nil.
+
 2002-01-21  Kenichi OKADA  <okada@opaopa.org>
 
        * elmo-imap4.el (elmo-folder-list-subfolders): Case sensitive.
index 13cc289..58ba0f7 100644 (file)
@@ -2316,8 +2316,7 @@ If optional argument REMOVE is non-nil, remove FLAG."
 
 (defsubst elmo-imap4-folder-diff-plugged (folder)
   (let ((session (elmo-imap4-get-session folder))
-       messages
-       response killed)
+       messages new unread response killed)
 ;;; (elmo-imap4-commit spec)
     (with-current-buffer (elmo-network-session-buffer session)
       (setq elmo-imap4-status-callback nil)
@@ -2337,9 +2336,10 @@ If optional argument REMOVE is non-nil, remove FLAG."
        (setq messages (- messages
                          (elmo-msgdb-killed-list-length
                           killed))))
-    (list (elmo-imap4-response-value response 'recent)
-         (elmo-imap4-response-value response 'unseen)
-         messages)))
+    (setq new (elmo-imap4-response-value response 'recent)
+         unread (elmo-imap4-response-value response 'unseen))
+    (if (< unread new) (setq new unread))
+    (list new unread messages)))
 
 (luna-define-method elmo-folder-diff-plugged ((folder elmo-imap4-folder))
   (elmo-imap4-folder-diff-plugged folder))
index e27f310..6c573b4 100644 (file)
@@ -1227,7 +1227,7 @@ the value of `foo'."
 (defmacro elmo-string (string)
   "STRING without text property."
   (` (let ((obj (copy-sequence (, string))))
-       (set-text-properties 0 (length obj) nil obj)
+       (and obj (set-text-properties 0 (length obj) nil obj))
        obj)))
 
 (defun elmo-flatten (list-of-list)
index 802ad41..684efa2 100644 (file)
@@ -1,3 +1,8 @@
+2002-01-21  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-folder.el (wl-folder-check-one-entity): Don't care
+       `elmo-folder-use-flag-p'.
+
 2002-01-21  Kenichi OKADA  <okada@opaopa.org>
 
        * wl-folder (wl-folder-check-one-entity): Fix
index 43af1d2..99f2445 100644 (file)
@@ -833,15 +833,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 ;; If server diff, All unreads are
-                       ; treated as unsync.
-                   (and unread
-                        (elmo-folder-use-flag-p folder)
-                        (- unread (or new 0)))
-                   (elmo-folder-get-info-unread folder)
-                   (cdr (wl-summary-count-unread
-                         (elmo-msgdb-get-mark-alist
-                          (elmo-folder-msgdb folder))))))
+      (setq unread (or (and unread (- unread (or new 0)))
+                      (elmo-folder-get-info-unread folder)
+                      (cdr (wl-summary-count-unread
+                            (elmo-msgdb-get-mark-alist
+                             (elmo-folder-msgdb folder))))))
       (wl-folder-entity-hashtb-set wl-folder-entity-hashtb entity
                                   (list new unread all)
                                   (get-buffer wl-folder-buffer-name)))