-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
spacemacs-core: Fix issues with major-mode leader #3002
Conversation
Use same hook as evil-leader for major-mode-leader. This fixes an inconsistency that could arise between the leader key being bound but the major-mode leader key not being bound (See for example #3000). By using the same hook as evil-leader-mode, we ensure that either both keys or bound or neither. A minor problem that was fixed was `mode-map` and `major-mode-map` were not let bound and had global scope.
Added another change related to one of the issues brought up in #3000. It makes sense to use the same hook that evil-leader-mode does in binding the major-mode-leader key, so that we don't get the inconsistency between the leader being bound without the major-mode leader key being bound, which seems to be a result of one hook successfully firing and the previously used hook for the major-mode leader key not firing (because of an error in setting up the major-mode). |
YES, that's a good solution. 💯 |
Although I should like to have it in both hooks, so that it updates if one actually does change the major mode. AFAICT there's no problem if this code runs twice. |
@TheBB It will as it is here. evil-leader has to worry about the major-mode changing too. I'm just following it |
Hm, you're right, it works. |
The idea is that it's as if we just rewrote evil-leader and added the code to the minor-mode initialization. For spacemacs we essentially need a version of evil-leader that support multiple leader keys |
Having our own evil-leader implementation can be considered. Also it may be useful to support minor modes if it is possible. Thank you 👍 @TheBB @justbur I just realized that the choice of Cherry-picked into develop branch, you can safely delete your branch. |
Kernel? Essentials? |
I like base layer. Something to build on.
|
|
Oh yes, sorry. That's what I meant On Tue, Sep 15, 2015 at 9:29 AM, Sylvain Benner notifications@github.com
|
For background see the discussion in syl20bnr#3002.
Per the discussion in syl20bnr#3002.
Per the discussion in syl20bnr#3002.
Per the discussion in syl20bnr#3002.
Per the discussion in syl20bnr#3002. A comment in syl20bnr#3047 prompted this PR.
I renamed |
mode-map
andmajor-mode-map
were not let bound and had global scope. Seems like a bad idea for variables named like this