-
-
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
buffer-local parens? #347
Comments
What is simple is for everyone to decide. As for the question, it's not possible. You can work around that by adding predicates using the This is suboptimal, I agree. I'm redesigning the UI once again for the next version, I will make sure this issue (of adding buffer-local pairs) is addressed. Currently, there is no UI for that. The pairs can have complex dependencies and inheritance and this is resolved each time major-mode is changed. You can of course replace the data structures manually, but there's too much state to do that reliably. In the next version, there will definitely be no However, the release date is probably quite far. |
Using |
If you test for the |
This is now implemented, see the documentation: http://smartparens.readthedocs.io/en/latest/pair-management.html#named-pair-definitions-buffer-local |
Is it possible to add a pair just for the current buffer?
By skimming through the source, it looks like most of the relevant variables are already buffer-local, though calling (sp-pair) from within a mode hook results in emacs going crazy.
The reason behind this is having complex modes such as ess-mode do "the right thing"(tm) depending on the real language being used. Unfortunately, the major-mode is always "ess-mode", thought the underlying language could vary (R, SAS, Julia...). Several hooks are provided by ess for this reason.
I'm also baffled as of why (sp-local-pair) requires a mode. Wouldn't be more simple to make (sp-local-pair) simply work on buffer-local variables and just call it from a hook, like most other minor modes do?
The text was updated successfully, but these errors were encountered: