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: Dmitry Gutov
Subject: bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun
Date: Sat, 10 Dec 2022 21:25:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 10/12/2022 16:04, Eli Zaretskii wrote:
Date: Fri, 9 Dec 2022 22:30:55 +0200
Cc:larsi@gnus.org,59662@debbugs.gnu.org,casouri@gmail.com,
  monnier@iro.umontreal.ca
From: Dmitry Gutov<dgutov@yandex.ru>

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?

Either point is in a comment (possibly multiline), or the comment starts after point on the same line.

+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)?

Same as "after point", yes.





reply via email to

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