From: okazaki Date: Tue, 7 Nov 2006 23:12:15 +0000 (+0000) Subject: (elmo-with-progress-display): Return the value of the last form in `body'. X-Git-Tag: wl-2_15_6-fixes~118 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=10b6445175b0604665b2684fa331b2e438649e15;p=elisp%2Fwanderlust.git (elmo-with-progress-display): Return the value of the last form in `body'. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index e52bb40..725a3f3 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,8 @@ +2006-11-08 Tetsurou Okazaki + + * elmo-util.el (elmo-with-progress-display): Return the value + of the last form in `body'. + 2006-11-07 Hiroya Murata * elmo-util.el (elmo-progress-start): Accept nil for `total'. Set diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index c744ff3..12dfe07 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -1241,11 +1241,12 @@ SPEC is a list as followed (LABEL TOTAL [VAR])." (total (nth 1 spec)) (var (or (nth 2 spec) (make-symbol "--elmo-progress-temp--")))) `(let ((,var (elmo-progress-start (quote ,label) ,total ,message))) - (unwind-protect - (progn - ,@body) - (elmo-progress-clear ,var)) - (elmo-progress-done ,var)))) + (prog1 + (unwind-protect + (progn + ,@body) + (elmo-progress-clear ,var)) + (elmo-progress-done ,var))))) (put 'elmo-with-progress-display 'lisp-indent-function '2) (def-edebug-spec elmo-with-progress-display