-
Notifications
You must be signed in to change notification settings - Fork 12
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
Emacs lisp question mark in function name can break coloring #42
Comments
I'll leave it to @Fanael to comment authoritatively, but I believe that the syntax table will know the truth about how to interpret a particular occurrence of |
It won't. Go ahead and see what
In fact, When I tried to solve this problem to fix Fanael/highlight-quoted#1, I came to the conclusion that to handle everything correctly you need to implement pretty much the Emacs Lisp reader, working in reverse. I'm afraid that unless somebody can show me I'm wrong and there's no need for the reader in reverse, all I can do is to wait for a patch to magically appear. Note to self: my Lisp shall use |
Not really, consider: ;; I know ?\( is recommended instead, but ?( is still pretty commonly used.
(pcase foo
(?(
(bar))
(?)
(qux))) |
Development has moved to https://github.com/Fanael/rainbow-delimiters. If the issue still persists, please report it there. |
Alright, so I took a quick look at why this is happening and I don't know if there is an easy fix. Basically, if you do(in emacs lisp):
Rainbow delimiters reads ?) as emacs lisp's character syntax and doesn't treat the ) as a pair, causing the color highlighting to break.
This may be hard to fix, I am not familiar enough with emacs lisp to know all the rules of when ?) should be interpreted as the character ) and when it should be interpreted as a delimiter.
My guess would be that if it is possible to check for ' ?)' versus '?)' then it would work, but i'm by no means sure. Basically the idea would be in perl regex form that you'd ignore
but not
The text was updated successfully, but these errors were encountered: