You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bars around bothaandb seem necessary. Neither of these examples exhibits the bug (for me):
'((|a| b) |c|) ;OK
'((a |b|) |c|) ;OK
Note: The bug happens with racket-mode, which lexes things in Emacs, mostly using regexps -- which means I think there will be always edge cases, and fixing one can easily create another. Regardless, I'll try to find time to dig in.
OTOH racket-hash-lang-mode uses the lexer provided by each #lang, and the racket lexer of course handles this fine and doesn't exhibit the bug. Although using that instead of racket-mode has its own set of pros and cons, you might prefer it if you like to write many expressions like your example. See Which major mode to use.
I added the fix-via-hash-lang-mode label. That's a bit misleading; as I said above, I plan to try to fix this in racket-mode. Instead, I added the label just as a hint/explanation that this is the kind of lexing edge case that racket-hash-lang-mode avoids.
Please copy all of the following lines and paste them into your bug report
at https://github.com/greghendershott/racket-mode/issues/.
Package
System values
Buffer values
Racket Mode values
Minor modes
Disabled minor modes
Steps to reproduce:
Issues with paren groupings when using
||
in variable names, e.g.(define var1 '(fn (fn |some text| |more text|) |even more text|))
racket mode thinks that there is a missing paren.
When adding a new line the issue is fixed:
The text was updated successfully, but these errors were encountered: