Skip to content

evil-collection rebinds keys that affect evil-emacs-state #16916

@bcc32

Description

@bcc32

That's not what I observe without this change though. evil-collection seems to affect holy-mode.

Indeed, this is bad. In the majority of modes, evil-collection binds keys only in normal state, but in a few cases it mutates the actual mode maps.

I think, ideally, all of those instances should get addressed in evil-collection, by making this behaviour optional or reversable.

I grepped for evil-collection-define-key\ nil and define-key in evil-collection, and compared with spacemacs-evil-collection-allowed-list: Only magit, magit-todos, ediff, and simple (which covers special-mode) seem to be affected in Spacemacs. For magit, evil-collection-magit provides evil-collection-magit-init and evil-collection-magit-revert. Similarly, for ediff, there is evil-collection-ediff-setup and evil-collection-ediff-revert. Unfortunately, those functions currently don't work flawlessly, otherwise we could make use of them within spacemacs-editing-style-hook.

Originally posted by @fnussbaum in #16909 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions