Otherwise, we'd be senselessly waiting for the package to load.
;; Certain keywords imply :defer, if :demand was not specified.
(when (and (not (plist-member args :demand))
(not (plist-member args :defer))
+ (not (or (equal '(t) (plist-get args :load))
+ (equal (list (use-package-as-string name))
+ (mapcar #'use-package-as-string
+ (plist-get args :load)))))
(cl-some #'identity
(mapcar (apply-partially #'plist-member args)
use-package-deferring-keywords)))
(ignore
(add-hook 'hook-special #'fun))))))
+(ert-deftest use-package-test/:hook-5 ()
+ (match-expansion
+ (use-package erefactor
+ :load-path "foo"
+ :after elisp-mode
+ :load t
+ :hook (emacs-lisp-mode
+ . (lambda ()
+ (bind-key "\C-c\C-v" erefactor-map emacs-lisp-mode-map))))
+ `(progn
+ (eval-and-compile
+ (add-to-list 'load-path ,(pred stringp)))
+ (eval-after-load 'elisp-mode
+ '(progn
+ (require 'erefactor nil nil)
+ (ignore
+ (add-hook
+ 'emacs-lisp-mode-hook
+ #'(lambda nil
+ (bind-key "\ 3\16" erefactor-map emacs-lisp-mode-map)))))))))
+
(ert-deftest use-package-test-normalize/:custom ()
(flet ((norm (&rest args)
(apply #'use-package-normalize/:custom