1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-24 13:32:41 -08:00

Merge pull request from aspiers/best-practices

Start addressing some of @jaalto's submitted issues.
GitHub-reference: https://github.com/jwiegley/use-package/issues/79
This commit is contained in:
John Wiegley 2014-01-06 12:53:52 -08:00
commit 6ca942d780
2 changed files with 5 additions and 5 deletions

View file

@ -6,7 +6,7 @@
;; Created: 16 Jun 2012
;; Version: 1.0
;; Keywords: keys keybinding config dotemacs
;; X-URL: https://github.com/jwiegley/bind-key
;; URL: https://github.com/jwiegley/use-package
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU General Public License as

View file

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