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: Daniel Martín
Subject: bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun
Date: Fri, 02 Dec 2022 22:09:55 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (darwin)

Theodor Thornhill <theo@thornhill.no> writes:

> Right - thanks.  However, this makes me wonder - should we really be
> setting mark here? I see that c-indent-defun does not, and it feels
> weird that indenting adds to the mark ring.  What do you think?  My
> first patch used
>
> (indent-region
>   (treesit-node-start node)
>   (treesit-node-end node))
>
> Which behaves similarly to c-indent-defun.
>
> See attached patch.

I don't have a strong opinion, but if we can indent without setting the
mark, I think it'd be a cleaner command.  Specially if c-indent-defun
doesn't set the mark either.




reply via email to

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