emacs-evil / evil-collection

A set of keybindings for evil-mode

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

evil-collection always loads evil-collection-image

mychris opened this issue · comments

Evil collection seems to always load evil-collection-image as soon as evil-collection-init is called.
Because evil-collection-image requires image-mode, and image-mode requires dired, a whole lot of packages are loaded right away.

I think this is the case, because in evil-collection, the module that configures image-mode is called image, and therefore depends on the image feature. But the image feature is not image-mode. It's a library for image handling which is always loaded during Emacs startup. evil-collection-image should depend on image-mode, not on image as far as I understand.

You can test this by looking into the load-history variable before and after evil-collection-init is called.

Startup emacs -Q
C-h v load-history
search for image.elc and image-mode.elc
execute your emacs -Q recipe
C-h v load-history
search for image-mode.elc and dired.elc

Changing the line image to (image image-mode) in the initialization of evil-collection--supported-modes makes the problem disappear.

👍

I just made a PR for your change.

Check the HEAD commit.

Perfect, thank you.
Very much appreciated.