Major refactor & optimization of how modules load their packages

Now that we are loading package autoloads files (as part of the
generated doom-package-autoload-file when running make autoloads), many
:commands properties are redundant. In fact, many def-package! blocks
are redundant.

In some cases, we can do without a config.el file entirely, and can move
into the autoloads file or rely entirely on package autoloads.

Also, many settings have been moved in their module's autoloads files,
which makes them available ASAP; their use no longer depends on module
load order.

This gained me a modest ~10% boost in startup speed.
This commit is contained in:
Henrik Lissner 2018-05-25 00:46:11 +02:00
parent 6a140209b8
commit 09cb4f6716
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
93 changed files with 644 additions and 846 deletions

View file

@ -11,17 +11,18 @@
;; Plugins
;;
(def-package! password-store
;; `password-store'
(setq password-store-password-length 12)
;; `pass'
(def-package! pass
:defer t
:config
(setq password-store-password-length 12))
(def-package! pass
:commands pass
:config
(set! :evil-state 'pass-mode 'emacs)
(set! :popup "^\\*Password-Store" '((side . left) (size . 0.25)) '((quit)))
(set! :popup "^\\*Password-Store"
'((side . left) (size . 0.25))
'((quit)))
(map! :map pass-mode-map
"j" #'pass-next-entry
"k" #'pass-prev-entry
@ -30,12 +31,6 @@
"C-k" #'pass-next-directory))
(def-package! helm-pass
:when (featurep! :completion helm)
:commands helm-pass)
;; Is built into Emacs 26+
(def-package! auth-source-pass
:when (featurep! +auth)
:config (auth-source-pass-enable))
(when (and EMACS26+ (featurep! +auth))
(auth-source-pass-enable))

View file

@ -4,7 +4,7 @@
(package! pass)
(package! password-store)
(when (featurep! +auth)
(when (and EMACS26+ (featurep! +auth))
(package! auth-source-pass))
(when (featurep! :completion helm)