From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun Date: Sat, 10 Dec 2022 16:04:18 +0200 Message-ID: <83sfhnwe1p.fsf@gnu.org> References: <5B538888-E454-4F75-B3B8-AB20E10B3E89@gmail.com> <4d605e69-7df9-6480-c1c5-dcb22abd3bde@yandex.ru> <83y1ri2wnj.fsf@gnu.org> <875yemz55b.fsf@thornhill.no> <83r0xa2tc4.fsf@gnu.org> <87zgbyxohf.fsf@thornhill.no> <837cz22bgd.fsf@gnu.org> <2C2420B5-A0BE-4A81-A924-0F40DD57F211@thornhill.no> <877cz1d7vq.fsf@thornhill.no> <83ilil1wot.fsf@gnu.org> <877E42C0-4FDD-4ED7-933D-AB2199BBCEF3@thornhill.no> <83edt917z5.fsf@gnu.org> <87o7scww07.fsf@thornhill.no> <40acda30-cf00-b419-b726-2794206c96e9@yandex.ru> <87ilikws6a.fsf@thornhill.no> <87edt8wqyo.fsf@thornhill.no> <64801406-62b9-c691-da3e-b8dbcee203be@yandex.ru> <87wn70injy.fsf@thornhill.no> <834ju4z5vu.fsf@gnu.org> <9e327f59-15d2-4af1-837c-53e8a793754e@yandex.ru> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8050"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 59662@debbugs.gnu.org, theo@thornhill.no, casouri@gmail.com, monnier@iro.umontreal.ca To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 10 15:05:34 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p40Tu-0001r4-2O for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Dec 2022 15:05:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p40Tk-0001au-NA; Sat, 10 Dec 2022 09:05:28 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p40TO-0001Zc-6m for bug-gnu-emacs@gnu.org; Sat, 10 Dec 2022 09:05:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p40TN-0002lD-UL for bug-gnu-emacs@gnu.org; Sat, 10 Dec 2022 09:05:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p40TN-0007RU-Kn for bug-gnu-emacs@gnu.org; Sat, 10 Dec 2022 09:05:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Dec 2022 14:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59662 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 59662-submit@debbugs.gnu.org id=B59662.167068107428594 (code B ref 59662); Sat, 10 Dec 2022 14:05:01 +0000 Original-Received: (at 59662) by debbugs.gnu.org; 10 Dec 2022 14:04:34 +0000 Original-Received: from localhost ([127.0.0.1]:42942 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p40Sv-0007R8-Kv for submit@debbugs.gnu.org; Sat, 10 Dec 2022 09:04:33 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:59762) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p40St-0007R2-3m for 59662@debbugs.gnu.org; Sat, 10 Dec 2022 09:04:32 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p40Sk-0002gF-Vq; Sat, 10 Dec 2022 09:04:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=BP6bHHx3MCGZo6a6oA8M+pXQUiwIeZefuClVrN8Sh60=; b=LDdbl4llJ48O 6CRzCBfScFdSdfBweeRZ13nwIMHl7RnBOxWDJ2SwpvlSWOPlU0pyfG6YcHeBA2NiFWsdzs24WYR/T S7Aa8BymzVOFu09YKVGVW+5rORyAMH284Wltex8fmHifm6u0WTg4NKlGxopFrr1hFF4pQ0e5TSjg8 uHE+b5Hho5wVJGE9VCDcghExE+Z8fMThS8CiE5/QpoFTcbCb/yL6Zch5aNtIVKd5O/x/JcGUEtBvD fkzi3BgKi0q39NniRCOJjGpZxLpW95SWv0VCw9ArU6Hfe8fWQX8+HsaL21bphzP3OeOmikuoX3Zfj G2jAn/UrcC5xJDcjzw8s5g==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p40Sk-0006XT-Ak; Sat, 10 Dec 2022 09:04:22 -0500 In-Reply-To: <9e327f59-15d2-4af1-837c-53e8a793754e@yandex.ru> (message from Dmitry Gutov on Fri, 9 Dec 2022 22:30:55 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:250521 Archived-At: > 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 > > 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)?