]> git.eshelyaron.com Git - emacs.git/commitdiff
Have loading timer include time to require
authorJohn Wiegley <johnw@newartisans.com>
Sun, 17 Jun 2012 10:12:13 +0000 (05:12 -0500)
committerJohn Wiegley <johnw@newartisans.com>
Sun, 17 Jun 2012 10:12:13 +0000 (05:12 -0500)
lisp/use-package/use-package.el

index 5bd8df7f9e48ba7e059ede30b869e92eda1de926..7ee39875eeb68ffc31c8b2b25fdc19cedcedb6f2 100644 (file)
                    t))
             `(if (and ,(or predicate t)
                       ,requires-test)
-                 (if ,(if (stringp name)
-                          `(load ,name t)
-                        `(require ',name nil t))
-                     (with-elapsed-timer
-                         ,(format "Loading package %s" name-string)
-                       ,init-body
-                       ,config-body
-                       t)
-                   (message "Could not load package %s" ,name-string))))))))
+                 (with-elapsed-timer
+                     ,(format "Loading package %s" name-string)
+                   (if (not ,(if (stringp name)
+                                 `(load ,name t)
+                               `(require ',name nil t)))
+                       (message "Could not load package %s" ,name-string)
+                     ,init-body
+                     ,config-body
+                     t))))))))
 
 (put 'use-package 'lisp-indent-function 1)