Closed katyo closed 11 years ago
This is way too many commits for one pull request. Splitting it up into separate features, and turning on new features conditionally.
Oh, sorry. Now it can be done.
Hangs emacs. Try:
var a = "foo \
"
If you hit enter after that last quote, emacs will hang. Looking into causes, fixes. Any thoughts?
Also, I'm not sure I like the default behavior of putting a backslash on the next line.
Hmm... not your code. Regular js3-mode does that too. Going to have to look into that.
Maybe, more right behavior is putting backslash only when cursor was on backslash not after.
I fixed the behavior of splitting string. Now when we press Enter key, if we're after a backslash, creating new string will be prevented, so we obtain backslash-newline-separated (\ \n in c-style) string.
So, when we typed something like this: "some\str" … and hit RET after \ char, we obtain: "some\ str" … instead of default behavior: "some\"
Of course, my fix is safe. So, using backslashes for escaping is covered. Even you typed something like: "some\str" … and hit RET after second slash, you will have "some\"