Rewrite :defer semantics

:defer now supports a hook, a cons cell with (SYMBOL . INTEGER) where
SYMBOL is a hook and INTEGER is a number of idle seconds before the
package is autoloaded, or just the integer (as per the default behavior
of :defer).

Also fixes an issue where switch-buffer-deffered packages (like
smartparens) wouldn't load.
This commit is contained in:
Henrik Lissner 2018-05-15 10:46:41 +02:00
parent 9a2c4f297c
commit 94f9e43f25
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
9 changed files with 22 additions and 28 deletions

View file

@ -281,13 +281,13 @@ DEFAULT is non-nil, set the default mode-line for all buffers."
;; undo/redo changes to Emacs' window layout
(def-package! winner
:defer buffer
:defer doom-after-switch-buffer-hook
:preface (defvar winner-dont-bind-my-keys t) ; I'll bind keys myself
:config (winner-mode +1))
;; highlight matching delimiters
(def-package! paren
:defer input
:defer pre-command-hook
:config
(setq show-paren-delay 0.1
show-paren-highlight-openparen t