From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: john muhl Newsgroups: gmane.emacs.bugs Subject: bug#70345: [PATCH] 29.1.50; csharp-ts-mode indentation of if statements with single-statement body Date: Sat, 27 Apr 2024 08:10:47 -0500 Message-ID: <875xw2et3e.fsf@pub.pink> References: <87o7afod31.fsf@gmail.com> <87mspusb5k.fsf@thornhill.no> <87wmopaii8.fsf@gmail.com> <867cgl1la9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32816"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.10.8; emacs 30.0.50 Cc: dmitry@gutov.dev, 70345@debbugs.gnu.org, theo@thornhill.no, Jacob Leeming To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Apr 27 17:15:12 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 1s0jlf-0008Mb-8C for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Apr 2024 17:15:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s0jlG-0007eG-BE; Sat, 27 Apr 2024 11:14:46 -0400 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 1s0jlD-0007dl-V6 for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2024 11:14:43 -0400 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 1s0jlD-0005EB-MR for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2024 11:14:43 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s0jlV-0002Fu-Ts for bug-gnu-emacs@gnu.org; Sat, 27 Apr 2024 11:15:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: john muhl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Apr 2024 15:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70345 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70345-submit@debbugs.gnu.org id=B70345.17142308718649 (code B ref 70345); Sat, 27 Apr 2024 15:15:01 +0000 Original-Received: (at 70345) by debbugs.gnu.org; 27 Apr 2024 15:14:31 +0000 Original-Received: from localhost ([127.0.0.1]:49512 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s0jl1-0002FR-Fb for submit@debbugs.gnu.org; Sat, 27 Apr 2024 11:14:31 -0400 Original-Received: from wfout8-smtp.messagingengine.com ([64.147.123.151]:54721) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s0jkw-0002FJ-77 for 70345@debbugs.gnu.org; Sat, 27 Apr 2024 11:14:30 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.west.internal (Postfix) with ESMTP id 07EB01C000B5; Sat, 27 Apr 2024 11:14:00 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 27 Apr 2024 11:14:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; 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=fm3; t=1714230840; x=1714317240; bh=6H9F5GFbMc 9Cww+KmhWsjCFcD9z1D+QXpTl4NjwP2vk=; b=JEjsfp5F4ryJf2ETvdyCXBNkvv clGr6vWsaPRKUhuazU76H/80hjl9y8cP9rK+fDqKRbktAy0FJi+WmnbufJgfTqGO tTBOCPjt0ly5Z6EnlKPtzNBi0WawOd3BQ2dB5XuBvMXOWbf4a48hBA327QJxIj8E NR0I8H4rDliusG4+CRlLAQRcp+kp0qwuyj9AABTh1U784iWNMAiwAYrZyVmDbhu7 mzhusaTriWxEg3fPg0kRtO/Si+Aa9OOYhaaCCYsl7GqeBzWcFhI6s9CqY3KCaz/h 2+4YS8PmS6VZz56qLqiNEXQxYOj0B+Squj3sdwpltTpZtJ4QsmDFDFlXvyLw== 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=1714230840; x=1714317240; bh=6H9F5GFbMc9Cww+KmhWsjCFcD9z1 D+QXpTl4NjwP2vk=; b=A0NpOR1RQj1UZXxIcfYP3HCMr5puRYMT5ANabWiwKTK8 PjtSm0K/hJ8XHC0CvCXJ4Z7LjuKaSZRqkS3ZQWo5k88dduK6AnKbYQrjcxdE/Qpt 6bhj876iT3LGLB2DPquqBcHzhMPuLybjhK/LdOKsAKUvx6sAf84Psv/Hfxbgkeww 7AM81MIoMZKfhEprWGZj3gFKN1qCm9xbuPLkYSnv7CiW55FCsl4/IPpjojsPnbHA /QxPUpS6hSmKXQ0GA+gkToZQok402DLR4q2eS2r35ZBVCoYffuG81szKNkkWa4yK ZfjPQ+mn8kXpUA/oi4OH69cK7TpL8gG0Tp/34ZzOSg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvddtuddgkeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfhgfhffvvefuffgjkfggtgesmhdtreertdertdenucfhrhhomhepjhhohhhn uchmuhhhlhcuoehjmhesphhusgdrphhinhhkqeenucggtffrrghtthgvrhhnpedufedtte eludegledvfefhhfeileetkeelhffhheekuefggffftdejgfehgfelhfenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehjmhesphhusgdrphhinh hk X-ME-Proxy: Feedback-ID: i74194916:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 27 Apr 2024 11:13:59 -0400 (EDT) In-reply-to: <867cgl1la9.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:284052 Archived-At: --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> Cc: 70345@debbugs.gnu.org, Jacob Leeming >> From: Jacob Leeming >> Date: Mon, 22 Apr 2024 09:50:23 +0100 >> >> > Looks good to me. Are you willing to pack this up with a nice test >> > confirming the behavior? >> > >> > All the best, >> > Theo >> >> Thanks all, >> >> Discovered we had a similar issue for else blocks. Wrote a test that >> covers both cases. >> >> See the attached diff which contains my changes to the indent rules and >> the test. > > Thanks, I installed this on the emacs-29 branch. (The test you added > should have been added to csharp-mode-tests.el, since our test files > follow the names of the implementation files, and csharp-ts-mode is > implemented in csharp-mode.el. I fixed that.) The test should check that the c-sharp grammar is available so that it gets marked as skipped instead of failed. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Skip-csharp-ts-mode-test-if-grammar-is-missing.patch >From 068cad8612c31cea41f0cc21a865efe0785d4e7a Mon Sep 17 00:00:00 2001 From: john muhl Date: Sat, 27 Apr 2024 09:55:42 -0500 Subject: [PATCH] ; Skip 'csharp-ts-mode' test if grammar is missing * test/lisp/progmodes/csharp-mode-tests.el (csharp-ts-mode-test-indentation): Skip test instead of failing. --- test/lisp/progmodes/csharp-mode-tests.el | 1 + 1 file changed, 1 insertion(+) diff --git a/test/lisp/progmodes/csharp-mode-tests.el b/test/lisp/progmodes/csharp-mode-tests.el index 2878fa601f2..b3c57a7026b 100644 --- a/test/lisp/progmodes/csharp-mode-tests.el +++ b/test/lisp/progmodes/csharp-mode-tests.el @@ -27,6 +27,7 @@ csharp-mode-test-indentation (ert-test-erts-file (ert-resource-file "indent.erts"))) (ert-deftest csharp-ts-mode-test-indentation () + (skip-unless (treesit-ready-p 'c-sharp)) (ert-test-erts-file (ert-resource-file "indent-ts.erts"))) (provide 'csharp-mode-tests) -- 2.41.0 --=-=-=--