From: teranisi Date: Mon, 21 Jan 2002 09:14:52 +0000 (+0000) Subject: * wl-folder.el (wl-folder-check-one-entity): Don't care X-Git-Tag: wl-2_9_6~27 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=08befe6aaf9f40993117d841bbda49cb271aafdb;p=elisp%2Fwanderlust.git * wl-folder.el (wl-folder-check-one-entity): Don't care `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. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index cddac78..007bec6 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,10 @@ +2002-01-21 Yuuichi Teranishi + + * 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 * elmo-imap4.el (elmo-folder-list-subfolders): Case sensitive. diff --git a/elmo/elmo-imap4.el b/elmo/elmo-imap4.el index 13cc289..58ba0f7 100644 --- a/elmo/elmo-imap4.el +++ b/elmo/elmo-imap4.el @@ -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)) diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index e27f310..6c573b4 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -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) diff --git a/wl/ChangeLog b/wl/ChangeLog index 802ad41..684efa2 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,8 @@ +2002-01-21 Yuuichi Teranishi + + * wl-folder.el (wl-folder-check-one-entity): Don't care + `elmo-folder-use-flag-p'. + 2002-01-21 Kenichi OKADA * wl-folder (wl-folder-check-one-entity): Fix diff --git a/wl/wl-folder.el b/wl/wl-folder.el index 43af1d2..99f2445 100644 --- a/wl/wl-folder.el +++ b/wl/wl-folder.el @@ -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)))