From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#59662: 29.0.50; [PATCH] Add treesit--indent-defun Date: Thu, 08 Dec 2022 07:02:47 +0100 Message-ID: <65F2C4BB-BFD4-4116-B454-2C0AE06F3D2B@thornhill.no> References: <87a63zyo4k.fsf@thornhill.no> <840EC1DB-C322-494D-96DA-5D9582E0C8C5@gmail.com> <6AD2610D-8A71-4F34-A8CC-119C2FB55C40@thornhill.no> Reply-To: Theodor Thornhill Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32246"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , 59662@debbugs.gnu.org, mardani29@yahoo.es To: Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 08 07:04:27 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 1p3A1C-000856-DA for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 08 Dec 2022 07:04:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3A0r-0005Lv-IK; Thu, 08 Dec 2022 01:04:05 -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 1p3A0q-0005L2-1T for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 01:04:04 -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 1p3A0p-0007Jd-Ps for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 01:04:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p3A0p-00048z-LK for bug-gnu-emacs@gnu.org; Thu, 08 Dec 2022 01:04:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Dec 2022 06:04:03 +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.167047944215920 (code B ref 59662); Thu, 08 Dec 2022 06:04:03 +0000 Original-Received: (at 59662) by debbugs.gnu.org; 8 Dec 2022 06:04:02 +0000 Original-Received: from localhost ([127.0.0.1]:54587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3A0o-00048f-Cn for submit@debbugs.gnu.org; Thu, 08 Dec 2022 01:04:02 -0500 Original-Received: from out-228.mta0.migadu.com ([91.218.175.228]:10049) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p3A0j-00048S-Mp for 59662@debbugs.gnu.org; Thu, 08 Dec 2022 01:04:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1670479436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0WtqKQXSjkPT8irFdbL6pUp6KQwmk3cfjdQjSAeGcTI=; b=rKbPgox8E3I5wderYBZNSD4eqnUtecAmXcdjYIeOA4g3iFf+igtzyWvXgEP0W4SxoEhWck 1lare4ZEUy/PWA3HopRXruzDO6qUCri+Prpwfx9TkHgnEcYeR6eUxQgCYwCgTzXBScEN3C Azi/7sM87x6gtRnSEZxZ0lbBHQ18Cja1Yep01PIqcZYJ+coVPrydg/P8qXk1/Uc8v0Ftrn +EWO7atT3og9WUTNWk0w26NM7UN/DUfVIXhOgBdF4XtEDl9tJXbuu809axxN4t4TbfZ/hU f4Nw3Vi6lk2p2GJgbGq2kzut/GvXwJDEwiWeNz8eegrl4IKpyf7QUPOetKXjIw== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-Reply-To: X-Migadu-Flow: FLOW_OUT 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:250242 Archived-At: Would you mind describing why? >>>=20 >>> Yes, sorry=2E I=E2=80=99m planning to change treesit-beginning-of-defu= n and treesit-end-of-defun so they can behave differently according to user= configuration, basically they can decide whether to skip nested defuns or = not=2E If we use these functions rather than re-implementing their logic (t= o some extent) in c-ts-mode-indent-defun, any improvement to defun navigati= on would automatically benefit c-ts-mode-indent-defun=2E >>>=20 >>> Yuan >>=20 >> Thanks for explaining your rationale=2E=20 >>=20 >> By the way, there's an issue with the patch you applied: >>=20 >> void >> foo() >> { >> =2E=2E=2E >> } >>=20 >> If point is at the v in void, the current implementation will not reinv= ent=2E I didn't get time to debug yet, though=2E Possibly that will be fixe= d after your rework as well=2E > >Ah, thanks, I=E2=80=99ll fix that=2E And I=E2=80=99ll ask for your opinio= n before making changes next time, however innocent I thought the change is= :-) > >Yuan No stress, just wanted to point it out, but thanks! Theo