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
View this message in rfc822 format
> Date: Thu, 8 Dec 2022 03:37:54 +0200
> Cc: theo <at> thornhill.no, casouri <at> gmail.com, 59662 <at> debbugs.gnu.org,
> casouri <at> gmail.org
> From: Dmitry Gutov <dgutov <at> yandex.ru>
>
> >> AFAICT, these behaviors are quite compatible. But paredit's binding
> >> seems to be useful in more contexts.
> > I'm fine with trying something like that on master, to see whether users
> > like this conflation, but not on the release branch.
>
> Here's a patch that people can try. From my brief testing, seems useful
> enough. I suppose some might dislike it, though, in some codebases where
> the methods/functions are consistently longer than a screenful. I do
> like this binding in Emacs Lisp too, though.
Stefan, Lars: any comments?
I'm okay with installing this on master, but please rename the new
function to something like prog-fill-reindent; the "fill" part should
appear in the name, to explain why we have both prog-indent and this
function.
Also, a NEWS entry and some addition to the "Multi-line Indent" node
of the Emacs user manual would be nice.
Bonus points for adding something that could use treesit.el
capabilities, when those are available, instead of syntax-ppss, to
determine when we are in a comment or in a string. Or maybe Theo or
Yuan could suggest such an addition.
Thanks.
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.