-
-
Notifications
You must be signed in to change notification settings - Fork 247
Support multiple consecutive reader comments (#_#_a b) #545
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
Conversation
What's the problem you had with the tests? Make test works fine for me. |
|
What happens when you do Perhaps you can run |
Emacs 26.3 (+ licensing info)
|
Modified the default regexps and the heuristic to find the end of the region to comment out. Previously Emacs would treat the second `#_` as the commented form, and then highlight the following two forms as usual. Now it (mostly) matches what Clojure actually evaluates. Things get weird when you start mixing `#_` and forms, but this fixes the most common use cases, like key-value-pairs.
Okay, I've added some tests. It font-locks the second pair in |
6711a03
to
0b770ce
Compare
I guess you can just generate a huge Clojure buffer, start the Emacs profiler and see how much time will be spend in font-locking with both approaches. |
@sulami Thanks for tackling this! Sorry about the slow turnaround. |
Modified the default regexps and the heuristic to find the end of the region to
comment out.
Previously Emacs would treat the second
#_
as the commented form, and thenhighlight the following two forms as usual. Now it (mostly) matches what Clojure
actually evaluates. Things get weird when you start mixing
#_
and forms, butthis fixes the most common use cases, like key-value-pairs.
Tagging #404/#528 for visibility
Note: I couldn't get the tests to work locally, so I'd be grateful if someone wants to add a test case for the above.
Before submitting a PR mark the checkboxes for the items you've done (if you
think a checkbox does not apply, then leave it unchecked):
M-x checkdoc
and fixed any warnings in the code you've written.Thanks!