bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun


From: Dmitry Gutov
Subject: bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun
Date: Fri, 9 Dec 2022 16:56:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 09/12/2022 16:46, Theodor Thornhill wrote:
Dmitry Gutov <dgutov@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?

The programs.texi addition should probably mention refilling too.

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]