1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-24 07:20:37 +00:00

Correct return value from with-elapsed-timer

This commit is contained in:
John Wiegley 2012-06-26 06:59:54 -05:00
parent 28c6509148
commit 89a844fd9c

View File

@ -281,13 +281,14 @@
'(current-time))))
,(if use-package-verbose
`(message "%s..." ,text))
,@forms
,(when use-package-verbose
`(let ((elapsed
(float-time (time-subtract (current-time) now))))
(if (> elapsed 0.01)
(message "%s...done (%.3fs)" ,text elapsed)
(message "%s...done" ,text))))))
(prog1
,@forms
,(when use-package-verbose
`(let ((elapsed
(float-time (time-subtract (current-time) now))))
(if (> elapsed 0.01)
(message "%s...done (%.3fs)" ,text elapsed)
(message "%s...done" ,text)))))))
(put 'with-elapsed-timer 'lisp-indent-function 1)