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

Fix insertion of backslashes in non-"" strings #99

Merged
merged 1 commit into from Dec 18, 2016
Merged

Conversation

@trishume
Copy link
Contributor

trishume commented Oct 30, 2016

This fixes the bug where backslashes are inserted on RET in {| string |} literals and embedded minor modes like smerge-mode, where they are unwanted.

This patch simply checks that the delimiter of a literal is " which equates to code 34. Only auto-inserting backslashes in "" is IMO a much better behaviour than inserting them in any string-like thing including {| |} literals (where they are just literal backslashes) and editing merge conflicts.

I wrote this as a patch in my init.el and when I went to submit it here I noticed #54 but that PR is enormous and over a year old and seems to be held up indefinitely. I propose this tiny patch as a way to fix the bug for now. Maybe eventually some better solution can be put in place, but this annoying little bug should be patched as soon as possible in the mean time.

@Chris00 @monnier

This fixes the bug where backslashes are inserted on `RET` in `{| string |}` literals and embedded minor modes like [smerge-mode](https://github.com/jwiegley/emacs-release/blob/master/lisp/vc/smerge-mode.el), where they are unwanted.

I wrote this as a patch in my init.el and when I went to submit it here I noticed #54 but that PR is enormous and over a year old and seems to be held up indefinitely. I propose this tiny patch as a way to fix the bug for now. Maybe eventually some better solution can be put in place, but this annoying little bug should be patched as soon as possible in the mean time.
@trishume
Copy link
Contributor Author

trishume commented Dec 16, 2016

ping @Chris00 have you looked at this?

@Chris00 Chris00 merged commit 01c1012 into ocaml:master Dec 18, 2016
@Chris00
Copy link
Member

Chris00 commented Dec 18, 2016

Thanks but note that tuareg_indent.el contains old code that will be removed at some point.

@trishume trishume deleted the trishume:patch-1 branch Dec 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.