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

From: Eli Zaretskii <[email-masked]>
Date: Sat, 10 Dec 2022 16:04:18 +0200

> Date: Fri, 9 Dec 2022 22:30:55 +0200
> Cc: [email-masked], [email-masked], [email-masked],
>  [email-masked]
> From: Dmitry Gutov <[email-masked]>
> 
> On 09/12/2022 22:20, Eli Zaretskii wrote:
> 
> >> +(defun prog-fill-reindent-defun (&optional argument)
> >> +  "Refill paragraph or reindent the definition that the point is on.
> >> +
> >> +If the point is in a string, or in a comment, or there is a
> >> +comment on the current line, fill the paragraph that the point is
> >> +in or is on the same line.
> > 
> > I don't understand the difference between "point is in a string, or in
> > a comment" and "there is a comment on the current line".
> 
> The comment may start after point.

Only after, not before?

> >> +Otherwise, reindent the definition around or below point."
> > 
> > Likewise this one is confusing.
> 
> The intent was to describe the behavior that follows 'mark-defun'. Which 
> has this in its docstring:
> 
>    Put mark at end of this defun, point at beginning.
>    The defun marked is the one that contains point or follows point.

That one is clear.  Does "below point" means before point (i.e. lower
buffer position) or after point (i.e. lower on the screen)?