-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
Ensure turn-off-smartparens-mode also disables strict mode. #525
Conversation
If we disable it like this then turning sp back on would not re-enable strict mode, which is what I would expect. That is, if I enable strict mode for a buffer I would want |
ca52d17
to
6c2e39b
Compare
You're right, that'd be a little confusing. How about we add a I've modified my branch to add this command. |
Is there, then, any reason not to call |
Yep, exactly, I'd like it for hooks. I suppose I could call |
Maybe SP could have its own extra local variable which would track if the strict mode was on when sp was being disabled and re-enable it according to that. So the situations will be:
Since we have 2 modes with 2 states 4 situations should be all, unless I'm missing some sequence |
Hm, is it that complicated? Are there any situations where I'd want I thought strict mode was just SP with a few extensions. I can't see any situation where I wouldn't want to switch one off without also wanting to switch the other off. |
Right, the issue is more that if you had strict mode before and you toggle both off with just call to You are right that it makes little sense having just strict mode on without SP. The reason it's a minor mode is to have the keymap with the remapping toggle-able. |
I'm going to change the behaviour in the following way:
The other cases will do nothing special. If you first enable smartparens, then strict mode and then disable strict mode, it will only disable strict mode. This way it behaves in a way that I will also deprecate the |
The points from the above comment are now implemented. |
I've started using smartparens-strict-mode, and it works really well. However, I noticed my calls to
turn-off-smartparens-mode
didn't disable strict mode. This fixes that.I think this is a reasonable behaviour, let me know what you think.