1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-16 10:50:49 -08:00

add 'use-package-' prefix to 'with-elapsed-timer'

Fixes https://github.com/jwiegley/use-package/issues/35.
This commit is contained in:
Adam Spiers 2013-12-18 11:33:51 +00:00
parent 283653ff4b
commit 8f7e878caf

View file

@ -58,7 +58,7 @@
:type 'number :type 'number
:group 'use-package) :group 'use-package)
(defmacro with-elapsed-timer (text &rest forms) (defmacro use-package-with-elapsed-timer (text &rest forms)
(let ((body `(progn ,@forms))) (let ((body `(progn ,@forms)))
(if use-package-verbose (if use-package-verbose
(let ((nowvar (make-symbol "now"))) (let ((nowvar (make-symbol "now")))
@ -72,7 +72,7 @@
(message "%s...done" ,text)))))) (message "%s...done" ,text))))))
body))) body)))
(put 'with-elapsed-timer 'lisp-indent-function 1) (put 'use-package-with-elapsed-timer 'lisp-indent-function 1)
(defvar use-package-idle-timer nil) (defvar use-package-idle-timer nil)
(defvar use-package-idle-forms nil) (defvar use-package-idle-forms nil)
@ -341,13 +341,13 @@ For full documentation. please see commentary.
`(eval-after-load ,(if (stringp name) name `',name) `(eval-after-load ,(if (stringp name) name `',name)
`(,(lambda () `(,(lambda ()
(if ,requires-test (if ,requires-test
(with-elapsed-timer (use-package-with-elapsed-timer
,(format "Configuring package %s" name-string) ,(format "Configuring package %s" name-string)
,config-body)))))) ,config-body))))))
t)) t))
`(if (and ,(or predicate t) `(if (and ,(or predicate t)
,requires-test) ,requires-test)
(with-elapsed-timer (use-package-with-elapsed-timer
,(format "Loading package %s" name-string) ,(format "Loading package %s" name-string)
(if (not ,(if (stringp name) (if (not ,(if (stringp name)
`(load ,name t) `(load ,name t)