5

Quoting from use-package

If you aren't using :commands, :bind, :bind*, :bind-keymap, :bind-keymap*, :mode, or :interpreter (all of which imply :defer; see the docstring for use-package for a brief description of each), you can still defer loading with the :defer keyword:

But why I found many people including jwiegley himself still use :defer even it's already have :bind

  • 1
    The example you linked from Wiegley's configuration uses :defer 5 (not just :defer on its own) to load the package automatically after 5 seconds. – Omar May 6 '18 at 15:07
  • @azzamsa this probably helps: emacs.stackexchange.com/q/19694/19819 – Hubisan Nov 18 at 6:49
1

The answer is present on use-packages's GitHub page under section "Notes about lazy loading". To quote,

In almost all cases you don't need to manually specify :defer t. This is implied whenever :bind or :mode or :interpreter is used. Typically, you only need to specify :defer if you know for a fact that some other package will do something to cause your package to load at the appropriate time, and thus you would like to defer loading even though use-package isn't creating any autoloads for you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.