7

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

azzamsa
  • 634
  • 7
  • 16
  • 3
    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 06 '18 at 15:07
  • 1
    @azzamsa this probably helps: https://emacs.stackexchange.com/q/19694/19819 – Hubisan Nov 18 '19 at 06:49

1 Answers1

4

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.

scribe
  • 930
  • 4
  • 15