From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#67556: 29.1; java-ts-mode doesn't indent open curly brackets properly Date: Mon, 12 Feb 2024 00:42:50 +0200 Message-ID: <3d3f645e-c2cd-4184-adf9-adf459a65f67@gutov.dev> References: <4ef658bb-9336-439e-aba6-2b1caca9fda3@email.android.com> <83ttoimkc4.fsf@gnu.org> <83msu1e1dh.fsf@gnu.org> <87sf3mvjqj.fsf@thornhill.no> <834jg292fv.fsf@gnu.org> <83plyanuof.fsf@gnu.org> <83r0ictlui.fsf@gnu.org> <86wmrbs869.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------rf6RGZ6tr7erkYwgtkinhXVV" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16278"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: spavkov@ilstu.edu, 67556@debbugs.gnu.org To: Eli Zaretskii , theo@thornhill.no, casouri@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 11 23:44:22 2024 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 1rZIYe-00042g-7D for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Feb 2024 23:44:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZIY8-0001qx-DA; Sun, 11 Feb 2024 17:43:48 -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 1rZIY6-0001qn-7D for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2024 17:43:46 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rZIY5-0003N7-Pz for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2024 17:43:45 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rZIYL-0007JN-U0 for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2024 17:44:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Feb 2024 22:44:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67556 X-GNU-PR-Package: emacs Original-Received: via spool by 67556-submit@debbugs.gnu.org id=B67556.170769140027982 (code B ref 67556); Sun, 11 Feb 2024 22:44:01 +0000 Original-Received: (at 67556) by debbugs.gnu.org; 11 Feb 2024 22:43:20 +0000 Original-Received: from localhost ([127.0.0.1]:55121 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZIXg-0007HE-6M for submit@debbugs.gnu.org; Sun, 11 Feb 2024 17:43:20 -0500 Original-Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:59013) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZIXd-0007Gh-GY for 67556@debbugs.gnu.org; Sun, 11 Feb 2024 17:43:18 -0500 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id A823032000D9; Sun, 11 Feb 2024 17:42:54 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sun, 11 Feb 2024 17:42:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1707691374; x=1707777774; bh=Btcv/bS8Kk ewU1H5j5Hllu0R15kfw2+3XwbCaLYv2yc=; b=AvHn0tyXDa1gurobjRLgtDntfG mkTtNgR9IOw0kebHtlpuiVrOZu1nytbjeWJh6OiF3lDkSJaRafa6gV3Qbwcqob+D hJGYnqb2qp5Uu6SdVZ0VbG3pHNCSEl9qwIGgVeOCunjIGiCyngb69vOzuSIffwE6 XgZf9tUZP4+drIaSjYmMkfmuZzQwGKuIXMpnIkz0dHVKQ192Q6BkSXKQCjmFVFiE lo6GrTLtlt1SCPGZHB+Hu8Efo5/C6Zl9RSsiKZIo3owLt1g6HWUHukFWrbnKPrMx 9ygD9wwIyf4vYOO09oRdcL7MHFXMsz9Ji2VKeDH5W5RKWxct7JHhbFLGw3Rg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1707691374; x=1707777774; bh=Btcv/bS8KkewU1H5j5Hllu0R15kf w2+3XwbCaLYv2yc=; b=uWF/buK/cf1dMv9DYVJ+scFkOM5x44ibTsQ7G5CTab72 DscMIu5I4qMAzBceqrUCnYQClO8bX/9ZoFtm8Z46sK74qoW8LTIybaTTQP9sgABG bEI8CQKvXQHQvlUEETFLN+Mx84XHLc5BwjZ08NJaJqzrP2US1D3hihySm9jVRmZb 7zT3605UtaZivPLXoTXcs09S72WRm/ZvwjnRP1nTIVKsTdHURq3+2WgdD8/vjkQ7 bZG33qgn+6bd9j+zjH/Fvbeq6lbiRKoMt0UBY56H0tQXug9cJRxcRA9vExsMR+8W hYbvT7l3V2jZFBpqGyrZkVrrT1xtU5AYE58MrV8YSA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledruddvgddtudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpegtkfffgggfuffvvehfhfgjsehmtderredtvdejnecuhfhrohhmpeffmhhithhr hicuifhuthhovhcuoegumhhithhrhiesghhuthhovhdruggvvheqnecuggftrfgrthhtvg hrnhepheelfedukeduudevkeeilefgieffvdekhfekleejueejgeeukeevffekjeejveeh necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepughmih htrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 11 Feb 2024 17:42:52 -0500 (EST) Content-Language: en-US In-Reply-To: <86wmrbs869.fsf@gnu.org> 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:279874 Archived-At: This is a multi-part message in MIME format. --------------rf6RGZ6tr7erkYwgtkinhXVV Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/02/2024 10:43, Eli Zaretskii wrote: > Ping! Ping! Ping! Yuan and Theo, could you please chime in? Here's a minimal patch, consisting of a new rule and a couple of replacements where the new standalone-parent anchor is used instead of the helper c-ts-common-statement-offset. Because the latter behaves differently when the opening curly is on a separate line, and we don't really want that. A more finished change will likely either switch over to standalone-parent completely, or go back and revamp c-ts-common-statement-offset to avoid this distinction (despite the name, it only remains in use in java-ts-mode these days). The former has been a simpler route so far, so I suggest we at least commit the attached. --------------rf6RGZ6tr7erkYwgtkinhXVV Content-Type: text/x-patch; charset=UTF-8; name="java-ts-mode-indent.diff" Content-Disposition: attachment; filename="java-ts-mode-indent.diff" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3AvcHJvZ21vZGVzL2phdmEtdHMtbW9kZS5lbCBiL2xpc3AvcHJv Z21vZGVzL2phdmEtdHMtbW9kZS5lbAppbmRleCAwYjFhYzQ5Yjk5Zi4uNTgwYzk3OWI5NGYg MTAwNjQ0Ci0tLSBhL2xpc3AvcHJvZ21vZGVzL2phdmEtdHMtbW9kZS5lbAorKysgYi9saXNw L3Byb2dtb2Rlcy9qYXZhLXRzLW1vZGUuZWwKQEAgLTc0LDcgKzc0LDkgQEAgamF2YS10cy1t b2RlLS1pbmRlbnQtcnVsZXMKICAgICAgKChwYXJlbnQtaXMgInByb2dyYW0iKSBjb2x1bW4t MCAwKQogICAgICAoKG1hdGNoICJ9IiAiZWxlbWVudF92YWx1ZV9hcnJheV9pbml0aWFsaXpl ciIpCiAgICAgICBwYXJlbnQtYm9sIDApCi0gICAgICgobm9kZS1pcyAifSIpIGNvbHVtbi0w IGMtdHMtY29tbW9uLXN0YXRlbWVudC1vZmZzZXQpCisgICAgICgobWF0Y2ggIlxcYFxcKD86 Y29uc3RydWN0b3JfYm9keVxcfGNsYXNzX2JvZHlcXHxpbnRlcmZhY2VfYm9keVxcfGJsb2Nr XFwpXFwnIikKKyAgICAgIHBhcmVudC1ib2wgMCkKKyAgICAgKChub2RlLWlzICJ9Iikgc3Rh bmRhbG9uZS1wYXJlbnQgMCkKICAgICAgKChub2RlLWlzICIpIikgcGFyZW50LWJvbCAwKQog ICAgICAoKG5vZGUtaXM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