-
Notifications
You must be signed in to change notification settings - Fork 20
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
Wrong return value of puni-region-balance-p in js2-mode #9
Comments
Could you double check this? It's This is because a problem in the v.f|((a) => a);
// forward-sexp
v.f((a) => a);|
// backward-sexp
|v.f((a) => a);
// forward-sexp
v|.f((a) => a); It treat this line as an sexp when going backward (using Let me think about how to fix this. I also noticed several other problems in |
you are perfectly right. I don't know what happened but
thank you very much. Is it something we could fix in |
I think it is. But to fix improper (in Puni's opinion) handling of sexps is the goal of Puni. If we patch |
I agree with you that a general-purpose workaround in Puni can help for other modes. I opened an issue on the js2-mode project anyway because they might still want to fix the problem on their side. |
Should be fixed. Please test. |
Thank you very much |
Given this content
in a
js2-mode
buffer, if I mark the second line and typeM-: (puni-region-balance-p (region-beginning) (region-end)) RET
, I getnil
but I expect a non-nil value because.filter((a) => a)
seems balanced to me.forward-sexp
seems to work fine butbackward-sexp
goes back to the beginning of the first line when invoked with point at the end of second line.forward-sexp-function
is nil.The text was updated successfully, but these errors were encountered: