GNU bug report logs -
#59662
29.0.50; [PATCH] Add treesit--indent-defun
Previous Next
Reported by: Theodor Thornhill <theo <at> thornhill.no>
Date: Mon, 28 Nov 2022 19:33:01 UTC
Severity: wishlist
Tags: patch
Found in version 29.0.50
Done: Yuan Fu <casouri <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #250 received at 59662 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Dmitry Gutov <dgutov <at> yandex.ru> writes:
> On 09/12/2022 16:46, Theodor Thornhill wrote:
>> Dmitry Gutov <dgutov <at> yandex.ru> writes:
>>
>>> On 09/12/2022 15:24, Theodor Thornhill via Bug reports for GNU Emacs,
>>> the Swiss army knife of text editors wrote:
>>>> Ok! Here's the patch. What do you all think?
>>>
>>> - The NEWS entry probably doesn't need to mention syntax-ppss or
>>> tree-sitter. Those are just implementation details.
>>>
>>> - treesit-text-type-regexp could have a default value. (regexp-opt
>>> '("comment")) seems popular enough.
>>>
>>
>> Something like this?
>
> Yes. But... :-)
>
> I guess you can replace (regexp-opt '("comment")) with just "comment"?
> Both regexps are equivalent, and neither uses anchoring (like \` and
> \'). Should they have anchoring?
>
Hehe, I did that first, but I trusted you knew some secret about that
expression. No, we get the names, so I think it's good.
> The programs.texi addition should probably mention refilling too.
>
Good point. Will fix that.
> And I see some additional changes in this patch, including ones that
> improve defun navigation, font-lock and indentation, in particular in
> java-ts-mode (but also json and typescript). These changes should
> probably go to emacs-29.
Yeah, I agree. Some of them are needed for this function to work
properly, but the patches I've submitted for them have been lingering
for a while.
See below patch - I guess we can decide on that last remark later :-)
[0001-Add-prog-fill-reindent-defun-bug-59664.patch (text/x-diff, attachment)]
This bug report was last modified 2 years and 158 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.