-
Notifications
You must be signed in to change notification settings - Fork 14
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
An escaped space (\ ) shouldn't be treated as whitespace. #20
Comments
Yikes. Sorry about that. It seems to me that this is hard to do right -- while in Lisp, the "?\ " string means "a literal space" and the space should be preserved, in Bash or JavaScript, a terminal \ is supposed to indicate a line continuation and presumably the space should be removed. ethan-wspace is about making it obvious when there's something invisible going on, so I think the existing behavior is preferable. I'd suggest you write your space as ?\s, or put something after it (a comment to highlight the fact that it's a literal space?). |
Yeah, that's what I did to fix it. I just thought you'd like to know this |
@glasserc Instead of matching the character |
@dgutov I don't understand -- how does that solve the problem? Don't you still need to resolve the ambiguity of whether or not the space after the backslash is significant? @Bruce-Connor Turns out ethan-wspace itself includes the "?\ " character, which now I want to change to "?\s". |
Hmm, yes, that's still a problem. Sorry for the noise. |
In one of my lisp files I had a line like
(defcustom name ?\
, which basically sets the space char as the initial value of the variable.After turning on ethan-wspace-mode (and editing + saving the file a few times), the space after
\
was removed which means the actual code was changed.The text was updated successfully, but these errors were encountered: