From bd98225ef4f18df052f61bf75b6fcd8375cc3e1b Mon Sep 17 00:00:00 2001 From: okazaki Date: Tue, 7 Nov 2006 12:23:23 +0000 Subject: [PATCH] (elmo-progress-start): Avoid updating `elmo-progress-counter' when a query callback returns nil. Return a progress counter instead of t whenever a start callback was called. --- elmo/elmo-util.el | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index 981930f..9f4910b 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -1193,12 +1193,10 @@ If optional DELETE-FUNCTION is speficied, it is used as delete procedure." (null elmo-progress-counter)) (let ((counter (cons label (vector 0 total action)))) (elmo-progress-call-callback counter 'start) - (setq elmo-progress-counter - (if (elmo-progress-call-callback counter 'query) - (progn - (elmo-progress-call-callback counter) - counter) - t))))) + (when (elmo-progress-call-callback counter 'query) + (elmo-progress-call-callback counter) + (setq elmo-progress-counter counter)) + counter))) (defun elmo-progress-done (counter) (when counter -- 1.7.10.4