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

From: Stefan Monnier <[email-masked]>
Date: Thu, 08 Dec 2022 14:50:32 -0500

> Sometimes it is good to easily differentiate between textual nodes and
> normal code.  One such case is for a filling and reindenting command,
> where we fill the textual node if point is on one, and reindent code
> otherwise.  This is a part of bug#59662.

I wonder if we shouldn't have something slightly more general, such as
a function which returns nil for "normal code" nodes and non-nil for
"textual" nodes, in which case it could additionally return info such as
whether it's rather like a comment or rather like a string or maybe some
information about how to insert/remove a linebreak from within it (in
case they need to be escaped somehow, or for line-comments).

        Stefan