From 10b6445175b0604665b2684fa331b2e438649e15 Mon Sep 17 00:00:00 2001 From: okazaki Date: Tue, 7 Nov 2006 23:12:15 +0000 Subject: [PATCH] (elmo-with-progress-display): Return the value of the last form in `body'. --- elmo/ChangeLog | 5 +++++ elmo/elmo-util.el | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) 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 -- 1.7.10.4