From ba2dc0e56694eaed22f7e174d6f8a19bbc7bf2c7 Mon Sep 17 00:00:00 2001 From: teranisi Date: Tue, 26 Jun 2001 05:16:07 +0000 Subject: [PATCH] * wl-summary.el (wl-summary-sync-update): If sync-result is non-nil, do update process; Don't update marks when update process is interrupted. * elmo.el (elmo-folder-synchronize): Return list of nil when no updates. --- elmo/ChangeLog | 5 +++++ elmo/elmo.el | 5 +++-- wl/ChangeLog | 6 ++++++ wl/wl-summary.el | 18 +++++++++++------- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index 81714c2..0b5a676 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2001-06-26 Yuuichi Teranishi + + * elmo.el (elmo-folder-synchronize): Return list of nil when no + updates. + 2001-06-21 Yuuichi Teranishi * elmo.el (elmo-generic-folder-append-messages): Fixed logic. diff --git a/elmo/elmo.el b/elmo/elmo.el index 3937506..b77b6dc 100644 --- a/elmo/elmo.el +++ b/elmo/elmo.el @@ -1174,7 +1174,8 @@ Return a list of \(NEW-MSGDB DELETE-LIST CROSSED\) NEW-MSGDB is the newly appended msgdb. DELETE-LIST is a list of deleted message number. -CROSSED is cross-posted message number." +CROSSED is cross-posted message number. +If update process is interrupted, return nil." (let ((killed-list (elmo-folder-killed-list-internal folder)) (before-append t) number-alist mark-alist @@ -1237,7 +1238,7 @@ CROSSED is cross-posted message number." (progn (elmo-folder-update-number folder) (elmo-folder-process-crosspost folder) - nil ; no update. + (list nil nil nil) ; no updates. ) (if delete-list (elmo-msgdb-delete-msgs (elmo-folder-msgdb folder) delete-list)) diff --git a/wl/ChangeLog b/wl/ChangeLog index be08af1..defeb09 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,9 @@ +2001-06-26 Yuuichi Teranishi + + * wl-summary.el (wl-summary-sync-update): If sync-result is non-nil, + do update process; + Don't update marks when update process is interrupted. + 2001-06-25 Yuuichi Teranishi * wl-summary.el (wl-summary-reply): Fixed problem when diff --git a/wl/wl-summary.el b/wl/wl-summary.el index 1123ba1..0d09c7b 100644 --- a/wl/wl-summary.el +++ b/wl/wl-summary.el @@ -2061,8 +2061,7 @@ If ARG is non-nil, checking is omitted." (setq new-msgdb (nth 0 sync-result)) (setq delete-list (nth 1 sync-result)) (setq crossed (nth 2 sync-result)) - (if (or (and sync-all sync-result) - sync-result) + (if sync-result (progn ;; Setup sync-all (if sync-all (wl-summary-sync-all-init)) @@ -2142,12 +2141,17 @@ If ARG is non-nil, checking is omitted." (if elmo-use-database (elmo-database-close)) (run-hooks 'wl-summary-sync-updated-hook) - (setq mes (format "Updated (-%d/+%d) message(s)" - (length delete-list) num))) - (setq mes (format - "No updates for \"%s\"" (elmo-folder-name-internal folder)))) + (setq mes + (if (and (eq (length delete-list) 0) + (eq num 0)) + (format + "No updates for \"%s\"" (elmo-folder-name-internal + folder)) + (format "Updated (-%d/+%d) message(s)" + (length delete-list) num)))) + (setq mes "Quit updating.")) ;; synchronize marks. - (if wl-summary-auto-sync-marks + (if (and wl-summary-auto-sync-marks sync-result) (wl-summary-sync-marks)) ;; scoring (when wl-use-scoring -- 1.7.10.4