]> git.eshelyaron.com Git - emacs.git/commitdiff
Added minimum load time display option
authorPhillip Lord <phillip.lord@russet.org.uk>
Tue, 5 Feb 2013 21:46:02 +0000 (21:46 +0000)
committerPhillip Lord <phillip.lord@russet.org.uk>
Tue, 5 Feb 2013 21:46:02 +0000 (21:46 +0000)
Makes the minimum load time before use-package displays
a message a customizable option.

lisp/use-package/use-package.el

index ea051ef91e78a1ce0835aaf73da99f3cf82c1b6e..b2ab81906309423b8462bc4c4dc003ad7d26f70b 100644 (file)
   :type 'boolean
   :group 'use-package)
 
+(defcustom use-package-minimum-reported-time 0.01
+  "Minimal load time that will be reported"
+  :type 'number
+  :group 'use-package
+  )
+
 (defmacro with-elapsed-timer (text &rest forms)
   `(let ((now ,(if use-package-verbose
                    '(current-time))))
        ,(when use-package-verbose
           `(let ((elapsed
                   (float-time (time-subtract (current-time) now))))
-             (if (> elapsed 0.01)
+             (if (> elapsed use-package-minimum-reported-time)
                  (message "%s...done (%.3fs)" ,text elapsed)
                (message "%s...done" ,text)))))))