Ensure evil-collection doesn't load early
This commit is contained in:
parent
8fa5b9406c
commit
1c9918e61e
1 changed files with 30 additions and 29 deletions
|
@ -225,6 +225,11 @@ and complains if a module is loaded too early (during startup)."
|
|||
(with-demoted-errors "evil-collection error: %s"
|
||||
(evil-collection-init (list module)))))
|
||||
|
||||
(defadvice! +evil-collection-disable-blacklist-a (orig-fn)
|
||||
:around #'evil-collection-vterm-toggle-send-escape ; allow binding to ESC
|
||||
(let (evil-collection-key-blacklist)
|
||||
(funcall-interactively orig-fn)))
|
||||
|
||||
;; These modes belong to packages that Emacs always loads at startup, causing
|
||||
;; evil-collection to load immediately. We avoid this by loading them after
|
||||
;; evil-collection has first loaded...
|
||||
|
@ -245,12 +250,8 @@ and complains if a module is loaded too early (during startup)."
|
|||
|
||||
(mapc #'+evil-collection-init '(comint custom help)))
|
||||
|
||||
(defadvice! +evil-collection-disable-blacklist-a (orig-fn)
|
||||
:around #'evil-collection-vterm-toggle-send-escape ; allow binding to ESC
|
||||
(let (evil-collection-key-blacklist)
|
||||
(funcall-interactively orig-fn)))
|
||||
|
||||
;; ...or on first invokation of their associated major/minor modes.
|
||||
(after! evil
|
||||
(add-transient-hook! 'Buffer-menu-mode
|
||||
(+evil-collection-init '(buff-menu "buff-menu")))
|
||||
(add-transient-hook! 'image-mode
|
||||
|
@ -275,4 +276,4 @@ and complains if a module is loaded too early (during startup)."
|
|||
(dolist (mode evil-collection-mode-list)
|
||||
(dolist (req (or (cdr-safe mode) (list mode)))
|
||||
(with-eval-after-load req
|
||||
(+evil-collection-init mode +evil-collection-disabled-list)))))
|
||||
(+evil-collection-init mode +evil-collection-disabled-list))))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue