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: Stefan Monnier
Subject: bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun
Date: Thu, 08 Dec 2022 14:50:32 -0500
User-agent: Gnus/5.13 (Gnus v5.13)

> 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






reply via email to

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