Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make poly-xxx-mode minor mode maps instantly available for evil users #228

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

srnnkls
Copy link

@srnnkls srnnkls commented May 23, 2019

No description provided.

@srnnkls srnnkls changed the title Make poly-xxx-mode minor made maps instantly available for evil users Make poly-xxx-mode minor mode maps instantly available for evil users May 23, 2019
@srnnkls
Copy link
Author

srnnkls commented May 23, 2019

See polymode/poly-org#14.

@@ -325,7 +325,8 @@ changes."
(evil-change-state old-state))))))

(eval-after-load 'evil-core
'(add-hook 'polymode-after-switch-buffer-hook 'polymode-switch-buffer-keep-evil-state-maybe))
'(add-hook 'polymode-after-switch-buffer-hook 'polymode-switch-buffer-keep-evil-state-maybe)
'(add-hook 'polymode-init-inner-hook #'evil-normalize-keymaps))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably ok, but can this be moved to the polymode-switch-buffer-keep-evil-state-maybe somehow? Basically, is there a way to check if keymaps are not installed and call evil-normalize-keymaps conditionally only when needed?

I think this problem occurs only when old-state is the same as new-state and is 'normal. I am just concerned that such unconditional keymap normalization can mess up with people who have evil loaded but not using it. What do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@srnnkls any ieas?

@srnnkls
Copy link
Author

srnnkls commented Jun 2, 2019

Sorry for the silence. Our baby arrived on Wednesday.

I do understand what you are trying to achieve and going to get my head around it more within the coming week.

@vspinu
Copy link
Collaborator

vspinu commented Jun 2, 2019

Our baby arrived on Wednesday.

Beautiful. Congrats!

Please take your time. If you cannot find time for it in the upcoming weeks I will either merge what you have or will try to figure out myself by browsing evil's code. Thanks anyhow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants