-
-
Notifications
You must be signed in to change notification settings - Fork 246
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
[Fix #586] Fix emacs freezing when opening file containing "comment" #651
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm - thanks much for the fix!
4e32a49
to
3315bcf
Compare
3315bcf
to
98088d2
Compare
98088d2
to
267afc9
Compare
@@ -6,6 +6,10 @@ | |||
|
|||
* Font-lock Lein's `defproject` as a keyword. | |||
|
|||
### Bugs fixed | |||
|
|||
* [#586](https://github.com/clojure-emacs/clojure-mode/issues/586): Fix infinite loop when opening file containing `comment` with `clojure-toplevel-inside-comment-form` set to `t`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, is this specific to comment
or to just having a single form in the buffer? Looking at the code it's the latter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If function clojure-sexp-starts-until-position
is called directly, then yes, it will loop forever for any single form in buffer. But this bug is triggered without user doing anything (except for opening the buffer) only when there's just comment
in buffer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would seem wise to create an issue for that edge case - having a more robust building block would make bugs less likely, in a future.
Other than that it seems good to merge this PR in!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #652
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!