-
Notifications
You must be signed in to change notification settings - Fork 93
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
Need two backslashes in regex string. #71
Conversation
Yeah, you're right. I'm the one who made that mistake (keep making it all the time...). Just a bit of clarification |
Thanks for the clarification, Bozhidar. Even after reading the regex docs in Emacs Info I didn't see the difference. I screw up escaping things in regexes all the time --- especially Emacs regexes. |
Need two backslashes in regex string.
I'm generally opposed to "just in case" patches (re: @bbatsov 's original fix to the regex at issue here) but in this particular project I'm glad to have more eyes on the code. There is some puzzle-solving yet to be done wrt the grammar (see open issues) that is beyond my capability & bandwidth as a single person. |
Thanks for accepting this patch. I may try to take a look at some of the issues if I have time, but I'm not a guru when it comes to language mode code. I've seen other language modes have the same problems with quotes and character constants, too. |
I think there is a general dearth of language mode gurus :P |
...and in truth, the issue isn't the language mode stuff. At issue is the original implementation of SMIE. There is nothing exotic about Elixir's syntax (specifically, indentation rules). My instinct is that there's a couple small bugs or quirks in the original code that needs to get hammered out. |
It seems like a few of the issues are because the question mark being treated as a character constant prefix inside comments and strings, when it shouldn't. Looks like there needs to be a check for not-in-comment and not-in-string in the function Hmm...I'm glancing at the SMIE docs for the first time. "The parsing technique used by SMIE does not allow tokens to behave differently in different contexts." Looks like I have more reading to do. |
My absent-mindedness excluded the
Don't think there was ever an abundance of those. :-) And we still have people like @dgutov (or Btw, SMIE differs in different Emacs versions. I know a lot of improvements were made in 24.4 (still unreleased), because more built-in modes adopted it. |
👍 FWIW I have been in contact with @monnier over email, he gave me some good info |
Ensure debugger process continues to run, adapts to the new behavior in Elixir 1.9 that changed `Mix.Task.run` to return instead of sleeping indefinitely: elixir-lang/elixir@3673849 - Fixes JakeBecker/elixir-ls#194 - Fixes JakeBecker/elixir-ls#185
The
auto-mode-alist
regexes in emacs-mode.el all end with "'" (one backslash + single quote) but they need to end with "\'" (two backslashes + single quote).The regexes are trying to match the empty string at the end of a regex (i.e., make sure that the file extension is at the end of the file name). Such a match is represented by either "$" or "'". However, inside an elisp string the backslash has to be escaped/doubled.