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#73778: 30.0.91; cpp-ts-mode indentation never finishes Date: Sat, 19 Oct 2024 11:12:35 +0300 Message-ID: <86ttd8lde4.fsf@gnu.org> References: <39d9021d-a4e8-4460-a113-0744f184e9dc@mailo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34680"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuan Fu , 73778@debbugs.gnu.org To: Augustin =?UTF-8?Q?Ch=C3=A9neau?= (BTuin) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 19 10:14:04 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 1t24b5-0008u4-N5 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Oct 2024 10:14:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t24aj-0003NG-2C; Sat, 19 Oct 2024 04:13:41 -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 1t24ag-0003Mx-P5 for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 04:13:38 -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 1t24ag-0002Km-Cs for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 04:13:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=sN0Ue6fOTky8FYNp8QtwXE6l+Jupckwk5hq9H+PwA74=; b=eSl2BohVWvPQeoOpcc3Bl3ltOQkDSKnHiomNG9TSmdK7crW3VVQYUQHSOxiKgQF/xtAeaHWndsYZd62CDBe1YRMA0PpkjWJLj8QJ2YY2iPBlMipeEMaJSAzn/TWELcSSLaSnAKAzNfGGAJY/6VF9GPFt3yMTarDuAvbMWZwNUmd4I1fK/dC1Qo69Kr0uadtSmtYQ4QLQFjtJjbrToEfzAy41GDRGeZkyqPYuNA8uvJcefHmf7kUjIUNoHpYynFy5Zyxc2q8RuNECDFkHOCq8kSC48j6V5goQQebEGT/oE2GnoQfIMyfCPBG3hIOJc3H/wLAJBG6dSPJWbJAr8BtZQQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t24b3-0001tU-Pf for bug-gnu-emacs@gnu.org; Sat, 19 Oct 2024 04:14:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Oct 2024 08:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73778 X-GNU-PR-Package: emacs Original-Received: via spool by 73778-submit@debbugs.gnu.org id=B73778.17293255907201 (code B ref 73778); Sat, 19 Oct 2024 08:14:01 +0000 Original-Received: (at 73778) by debbugs.gnu.org; 19 Oct 2024 08:13:10 +0000 Original-Received: from localhost ([127.0.0.1]:41271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t24aD-0001s4-NN for submit@debbugs.gnu.org; Sat, 19 Oct 2024 04:13:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:48490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t24aB-0001rp-MV for 73778@debbugs.gnu.org; Sat, 19 Oct 2024 04:13:08 -0400 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 1t24Zi-0002FW-89; Sat, 19 Oct 2024 04:12:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=sN0Ue6fOTky8FYNp8QtwXE6l+Jupckwk5hq9H+PwA74=; b=ADWZRDBFQ5D6uK9OxKv3 4a4XScZI2JtoXzVvXrNBRy6k9HEOWFdSfdqrV0NeCUYks5iwHHa5qvPyxjBA68wD0cQS1KkLOqdVJ K9MutM9EAixOIGdOXwGWhssFGVjDl6JT3OThD5OFDhcQXoCTuYZJ4kcjD3nggsOZnj9znNWlVXfd0 Ts9RuSRK7FFIwyZfYqhowK/DDX3iqZVRTT/zIC0sAtZc8cA8Vzu/RBmzxMxYCy7ESFWjIUmFEUSzz Rmc4hE3MaBclTP+Ig3dqLRWE2ddGf+FWWyZ8B1DyM42grE5FqQB3jywQa2oXF4dalJLZOI1tXaEf3 fMIs4RTsfPsQTQ==; In-Reply-To: <39d9021d-a4e8-4460-a113-0744f184e9dc@mailo.com> (bug-gnu-emacs@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:293847 Archived-At: > Date: Sat, 12 Oct 2024 21:20:47 +0200 > From: Augustin Chéneau (BTuin) via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > In c++-ts-mode, there is a bug when I indent a line with . > > This is trivially reproducible with the below code: > > int func() { > int a; > int b; > } > > Place your point before "int b;", press , and the indentation > process never finishes. > > This is caused by an error in c-ts-mode--anchor-prev-sibling, as the > condition of the last "or" in the function has incorrect > delimitation. Which means that the "if" will run the second test on > success, which then cause the function to be stuck in an infinite loop. > > I would gladly send you a patch, but I've been stuck in the legal limbo > of the copyright assignment for months now and I cannot contribute to > GNU Emacs (or any GNU project for the matter). > > I hope my description will be enough. I cannot reproduce this on the latest emacs-30 branch, perhaps because changes were installed in the function you mention two days after you have built your Emacs. Can you try the latest emacs-30 branch and see if the problem still persists? Thanks.