bug#80837: treesit-forward-comment off-by-one issue: overshoots by one character
Juri Linkov <[email protected]>
| Newsgroups | gmane.emacs.bugs |
|---|---|
| Organization | LINKOV.NET |
| Message-ID | <[email protected]> |
fixed 80837 31.1.rc1
close 80837 32.0.50
thanks
>>> >> Leaving emacs-31 unfixed makes c-ts-mode somewhat unusable
>>> >> since uncommenting is a frequent operation. If a small fix
>>> >> for treesit-forward-comment is still unfeasible, then at least
>>> >> we need to disable the 'comment' thing for c-ts-mode
>>> >> in the release branch:
>>> >>
>>> >> diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el
>>> >> index 5f064716a89..3efbee6f8a7 100644
>>> >> --- a/lisp/progmodes/c-ts-mode.el
>>> >> +++ b/lisp/progmodes/c-ts-mode.el
>>> >> @@ -1275,8 +1275,7 @@ c-ts-mode--thing-settings
>>> >> "goto_statement"
>>> >> "case_statement")))
>>> >> (text ,(regexp-opt '("comment"
>>> >> - "raw_string_literal")))
>>> >> - (comment "comment"))
>>> >> + "raw_string_literal"))))
>>> >> "`treesit-thing-settings' for both C and C++.")
>>> >
>>> > Actually this makes a lot of sense. I don’t think we are missing anything
>>> > by not using tree-sitter for the comment thing, forward/backward-comment
>>> > already works perfectly fine without it. We can also add a comment to
>>> > explain why we leave the comment thing out for c-ts-mode in the release
>>> > version.
>>>
>>> Eli and Sean, is this change ok to install on the release branch?
>>
>> I don't mind, but please wait for Sean to respond.
>
> Yes, I think this is okay.
Thanks for confirming, so now pushed with a comment, and closed.