diff --git a/doc/LAYERS.org b/doc/LAYERS.org index 8e5199790..5212b4e4f 100644 --- a/doc/LAYERS.org +++ b/doc/LAYERS.org @@ -228,16 +228,16 @@ The aspiring layer author is recommended to have a look at the =use-package= This simply loads Helm. It is essentially equivalent to =(require 'helm)=. #+begin_src emacs-lisp -(use-package helm - :defer t) +(use-package helm) #+end_src -This defers the loading of Helm using the auto-load facility and the auto-load -commands provided by the Helm source code. It is, in fact, a no-op. +By default =use-package= will try to defer the loading of the packages by using +the auto-load facility and the auto-load commands provided by the package source +code. So actually in the example above the code won't load =Helm= until one of +the auto-loaded functions is called. #+begin_src emacs-lisp (use-package helm - :defer t :init ;; Code to execute before Helm is loaded :config @@ -251,6 +251,15 @@ section is not executed until after loading, if ever. It is essentially equivalent to simply running the =:init= block, and then adding the =:config= block in an =with-eval-after-load=. +#+begin_src emacs-lisp +(use-package helm + :demand t) +#+end_src + +=:demand t= will force the package to be fully loaded right away. It +effectively disable lazy loading. + + #+begin_src emacs-lisp (use-package helm :commands (helm-find-files helm-M-x)) diff --git a/doc/VIMUSERS.org b/doc/VIMUSERS.org index f0b27e8d9..efd0b5d6a 100644 --- a/doc/VIMUSERS.org +++ b/doc/VIMUSERS.org @@ -386,14 +386,12 @@ that allows easy lazy-loading and configuration of packages. Here are the basics to using it: #+BEGIN_SRC emacs-lisp - ;; Basic form of use-package declaration. The :defer t tells use-package to - ;; try to lazy load the package. - (use-package package-name - :defer t) + ;; Basic form of use-package declaration. By default the package will be + ;; lazy loaded. + (use-package package-name) ;; The :init section is run before the package loads. The :config section is ;; run after the package loads (use-package package-name - :defer t :init (progn ;; Change some variables diff --git a/layers/+completion/auto-completion/README.org b/layers/+completion/auto-completion/README.org index 1162cb190..3ac9a924a 100644 --- a/layers/+completion/auto-completion/README.org +++ b/layers/+completion/auto-completion/README.org @@ -175,7 +175,6 @@ In the file =packages.el= of the python layer: (defun python/init-company-anaconda () (use-package company-anaconda - :defer t :init (spacemacs|add-company-backends :backends company-anaconda