GNU bug report logs - #60398
29.0.60; c++-ts-mode: Strange indentation of function body when parameter list has newline

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Knut Anders Hatlen <kahatlen@HIDDEN>; merged with #59686, #60496; dated Thu, 29 Dec 2022 07:50:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Merged 59686 60398 60496. Request was from Yuan Fu <casouri@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 60398 <at> debbugs.gnu.org:


Received: (at 60398) by debbugs.gnu.org; 29 Dec 2022 11:33:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 29 06:33:50 2022
Received: from localhost ([127.0.0.1]:59397 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pArAU-0000OV-9w
	for submit <at> debbugs.gnu.org; Thu, 29 Dec 2022 06:33:50 -0500
Received: from mail-lf1-f51.google.com ([209.85.167.51]:39497)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <kahatlen@HIDDEN>) id 1pArAR-0000OB-NO
 for 60398 <at> debbugs.gnu.org; Thu, 29 Dec 2022 06:33:48 -0500
Received: by mail-lf1-f51.google.com with SMTP id bf43so27144794lfb.6
 for <60398 <at> debbugs.gnu.org>; Thu, 29 Dec 2022 03:33:47 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=qNzp0/vsJXxZEtzeHppkZ9PDPg0AySWtgkwEVNaFEFM=;
 b=F1Gu3Zh6OA5VR+TTNftsMGyK96qpiw7gpQaeegjvVNxLbo8NdJJD13Z4w3GzavOmBg
 w9BPnDjbu4UjsUYIbTnFnq9DRvz3P+d4OJhtrYGkR/rtkY59xuG1KQjER2R1X9zOLWvk
 V/8aPxtplyNPn6fQgZC/Fxum+CBqJu6D1QYBPXEmcce9sZFEGEvm1kl9ouLEdWhu7JdG
 QjUbb3/lbWOIpMu8h9Vbgzg0Prs9mHrbAwiWcI9RScK6O6mK0+O3/xCKB9TBZ7ewA0sn
 fmYIKH0OUV/OLKPP7VNlWyH66R3Xf0q78a1+IDjUA/2h6AlhLbGk6cPPMhFU7R/UdcYs
 88rA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=qNzp0/vsJXxZEtzeHppkZ9PDPg0AySWtgkwEVNaFEFM=;
 b=VvKKaDG0D3FHNhvlTL12GXZBhfmfXPV4QlAIG926NT+4Y+l8nkY+tyWTzVh1s/fWGv
 fiVweCDWcinj0Zaavijf2TivzPZ0FoiIR4oHvyQv+6SAKUN67u1Fy/+QHMTx2GsTRX53
 RIGPluTDtyq6q3yaNwxzFo01cmt2OyIYlZMacBwWboiyWm6uPAPU/iG99gw+ummPvX0v
 r08xeLFqRDBaiPmoZk/N9DO+UvUpfXO3fSd7Ml9SJCrjjRKNyiiz+FzGfz4SEwrnI/TU
 gV/9+oyuQrWhV7f717/V7nWiFvxHxbfdtI+SjLEMgOjnQlScjbh1m1Pv128LgfCD4Gi8
 xHHQ==
X-Gm-Message-State: AFqh2kpjfjh8Om3l4JDYqVrgl5z12Gtw2Jq8D8KOoLxZjHP8dNxxUqLZ
 wazMv8fBcfDFL/acQj/jzw==
X-Google-Smtp-Source: AMrXdXs42lS5Iu1bZ0DFqQ50Fq6TjLIGASPDVqA88Gu9MoFP4IEjGEog810lBHO0SMqfCT2+K48dSQ==
X-Received: by 2002:ac2:5e2f:0:b0:4b5:5a15:8050 with SMTP id
 o15-20020ac25e2f000000b004b55a158050mr7743753lfg.32.1672313621550; 
 Thu, 29 Dec 2022 03:33:41 -0800 (PST)
Received: from dell ([2a02:1660:692e:dd00::44c])
 by smtp.gmail.com with ESMTPSA id
 o5-20020a05651205c500b004cb0bc96172sm1437268lfo.278.2022.12.29.03.33.40
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 29 Dec 2022 03:33:41 -0800 (PST)
From: Knut Anders Hatlen <kahatlen@HIDDEN>
To: Yuan Fu <casouri@HIDDEN>
Subject: Re: bug#60398: 29.0.60; c++-ts-mode: Strange indentation of
 function body when parameter list has newline
In-Reply-To: <118C936E-3A09-43E4-8FDA-E1755EE8F48F@HIDDEN> (Yuan Fu's
 message of "Thu, 29 Dec 2022 01:06:23 -0800")
References: <87y1qqd4zw.fsf@HIDDEN>
 <118C936E-3A09-43E4-8FDA-E1755EE8F48F@HIDDEN>
Date: Thu, 29 Dec 2022 12:33:40 +0100
Message-ID: <87bknmxx4b.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 60398
Cc: Theodor Thornhill <theo@HIDDEN>, 60398 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Yuan Fu <casouri@HIDDEN> writes:

>> On Dec 28, 2022, at 11:49 PM, Knut Anders Hatlen <kahatlen@HIDDEN> wrote:
>> 
>> 
>> Function bodies are indented strangely in c++-ts-mode if the parameter
>> list has a newline between two parameters. For example:
>> 
>> int f1(int x, int y) {
>>  // Indented as expected.
>>  return x + y;
>> }
>> 
>> int f2(int x,
>>       int y) {
>> 	 // Indented too much.
>> 	 return x + y;
>>       };
>
> I implemented a fix in 784e509bded, Theo, WDYT? Could this be used on other C-like modes, too?
>
> Yuan

It seems to behave as expected now. Thanks for the quick fix!

-- 
Knut Anders




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60398; Package emacs. Full text available.

Message received at 60398 <at> debbugs.gnu.org:


Received: (at 60398) by debbugs.gnu.org; 29 Dec 2022 10:45:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 29 05:45:57 2022
Received: from localhost ([127.0.0.1]:59365 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pAqQ9-0007TM-1k
	for submit <at> debbugs.gnu.org; Thu, 29 Dec 2022 05:45:57 -0500
Received: from out-23.mta0.migadu.com ([91.218.175.23]:36547)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <theo@HIDDEN>) id 1pAqQ6-0007TC-A1
 for 60398 <at> debbugs.gnu.org; Thu, 29 Dec 2022 05:45:55 -0500
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no;
 s=key1; t=1672310750;
 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:
 in-reply-to:in-reply-to:references:references;
 bh=vgN6duw1o9oKysDZBcRphK1IPVptaX4Nz28SsUEftJI=;
 b=kRJjhMQj1k0L2jC/2/bWo33kuLUOJBX//SASlAYoOkAIxCQGQ2SCZg9SZcjP1OJyiTDegO
 yfTSMoJZFwia+76VW7qBWRgfA89ouIT4SsZpnkfR6mMyG7CDWyY47D0AO8TobauIr8+mZt
 PIBACFDmMfrZgT1nCEwZvZtA52av3IuXf0YcvtIZmV4fJYhtuVv0Ecro9avUxCeFu/Dz4x
 8N+ojhgDPi7k6gSFITviwwZX5ZAw+r3o2K1z2gZ1kBkhcr9mwRuCEprDtvwp1sTzyw3VCV
 wweCPmRFanuwMbyvQpwIDgHD19AhymlTyqaSifXDSsR64tS6NewtyJkglMMZ6g==
From: Theodor Thornhill <theo@HIDDEN>
To: Yuan Fu <casouri@HIDDEN>, Knut Anders Hatlen <kahatlen@HIDDEN>
Subject: Re: bug#60398: 29.0.60; c++-ts-mode: Strange indentation of
 function body when parameter list has newline
In-Reply-To: <118C936E-3A09-43E4-8FDA-E1755EE8F48F@HIDDEN>
References: <87y1qqd4zw.fsf@HIDDEN>
 <118C936E-3A09-43E4-8FDA-E1755EE8F48F@HIDDEN>
Date: Thu, 29 Dec 2022 11:45:47 +0100
Message-ID: <87pmc2wkro.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Migadu-Flow: FLOW_OUT
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 60398
Cc: 60398 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Yuan Fu <casouri@HIDDEN> writes:

>> On Dec 28, 2022, at 11:49 PM, Knut Anders Hatlen <kahatlen@HIDDEN> wrote:
>> 
>> 
>> Function bodies are indented strangely in c++-ts-mode if the parameter
>> list has a newline between two parameters. For example:
>> 
>> int f1(int x, int y) {
>>  // Indented as expected.
>>  return x + y;
>> }
>> 
>> int f2(int x,
>>       int y) {
>> 	 // Indented too much.
>> 	 return x + y;
>>       };
>
> I implemented a fix in 784e509bded, Theo, WDYT? Could this be used on other C-like modes, too?
>

LGTM!

I believe that should work for most other cases of this, but IIRC there
are some cases where the compound statements are considered as siblings,
not children, but I forgot what it was exactly...

But I think this should work in most cases, at least!

Theo




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60398; Package emacs. Full text available.

Message received at 60398 <at> debbugs.gnu.org:


Received: (at 60398) by debbugs.gnu.org; 29 Dec 2022 09:06:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 29 04:06:32 2022
Received: from localhost ([127.0.0.1]:59247 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pAorv-0002he-Tv
	for submit <at> debbugs.gnu.org; Thu, 29 Dec 2022 04:06:32 -0500
Received: from mail-qv1-f49.google.com ([209.85.219.49]:44853)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1pAoru-0002hQ-Gf
 for 60398 <at> debbugs.gnu.org; Thu, 29 Dec 2022 04:06:30 -0500
Received: by mail-qv1-f49.google.com with SMTP id w10so9454248qvn.11
 for <60398 <at> debbugs.gnu.org>; Thu, 29 Dec 2022 01:06:30 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:from:to:cc:subject:date
 :message-id:reply-to;
 bh=JawB3aYpRsRmytkP+gplw9y5SWueOvH/ThS/hJYoC6g=;
 b=G19mKOaK5YjOfh913kmP6yKpPszIVHApMvoXT1tGaEZiF80QIVuHznuRe9Ry7tnSJb
 ITOsFr0Op/BnmNIKgl6yXyvqXkQuy2a/Gv/u9NUHxa4Ns568AESdoU5PIDeul0Wpr2Ii
 UJkL3dBYmCOEM3fv3EoVhOR4mtKCMnhKLlaXVb1i6/0Aw2hpnQ10YEHfKZ4jJkfDGFZR
 zTF0Ehx/z0yUvNZ99joM8uiWcOpvAX0K2BmPkJ50oYrnWJ+K6K13hpcnQz2eSXbJ62Lx
 RSFFob5DsXj0Iok7V7Ad7D9ONG26/0RL9im1e/EKmHhrmcFbjHBehDG9mO2JSmDVAGEh
 kKbQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=to:references:message-id:content-transfer-encoding:cc:date
 :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc
 :subject:date:message-id:reply-to;
 bh=JawB3aYpRsRmytkP+gplw9y5SWueOvH/ThS/hJYoC6g=;
 b=M09YzvTV6Xm5CqkKcBft0eBIk4OdqUXlUTM4gwsWyfIfoaf/E9szjUIjUt7KUdl7uh
 p4Hmq6vji1H5/bqJ/6froYCq5BsoaZbcSmw0mfcJgR7ueQZiqaAUaiBpXEqHjq9lPi4y
 ZizWbYZ6oRlV74qgQfWEUTdCwzcaz6ScGM87XXdRKj1fkunnZ5MbAn6IxKdqrNeoIPgq
 yup1cDcYKJgpohswflwYWIISuV0680COflu79qZ/tjKPp8lqNJIuuXSsgHyCgMio44yY
 TJAUPxlgGiZvMFigZXcPI69RTp97PY4dICVGp5WeiWXrPtlrWMXwLzZGyDqP8ujAavBc
 7SJw==
X-Gm-Message-State: AFqh2krozasNNIWGVurIV760Vz2sBk7kc9o33+ZVujw581B4ELX9SuwL
 XZgiphvzoE6M46WOkILDrws=
X-Google-Smtp-Source: AMrXdXuAbpjEAewNIT7GQrPTzRpuVsQ30gHz5p0v1U3b1RotQboAy1MOWoQRHomRT2sHHU60EqzvEg==
X-Received: by 2002:a0c:9166:0:b0:4df:59a8:b700 with SMTP id
 q93-20020a0c9166000000b004df59a8b700mr36406716qvq.42.1672304785012; 
 Thu, 29 Dec 2022 01:06:25 -0800 (PST)
Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com.
 [172.117.161.177]) by smtp.gmail.com with ESMTPSA id
 de15-20020a05620a370f00b006fbaf9c1b70sm12868531qkb.133.2022.12.29.01.06.24
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 29 Dec 2022 01:06:24 -0800 (PST)
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\))
Subject: Re: bug#60398: 29.0.60; c++-ts-mode: Strange indentation of function
 body when parameter list has newline
From: Yuan Fu <casouri@HIDDEN>
In-Reply-To: <87y1qqd4zw.fsf@HIDDEN>
Date: Thu, 29 Dec 2022 01:06:23 -0800
Content-Transfer-Encoding: quoted-printable
Message-Id: <118C936E-3A09-43E4-8FDA-E1755EE8F48F@HIDDEN>
References: <87y1qqd4zw.fsf@HIDDEN>
To: Knut Anders Hatlen <kahatlen@HIDDEN>
X-Mailer: Apple Mail (2.3696.120.41.1.1)
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 60398
Cc: Theodor Thornhill <theo@HIDDEN>, 60398 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)



> On Dec 28, 2022, at 11:49 PM, Knut Anders Hatlen <kahatlen@HIDDEN> =
wrote:
>=20
>=20
> Function bodies are indented strangely in c++-ts-mode if the parameter
> list has a newline between two parameters. For example:
>=20
> int f1(int x, int y) {
>  // Indented as expected.
>  return x + y;
> }
>=20
> int f2(int x,
>       int y) {
> 	 // Indented too much.
> 	 return x + y;
>       };

I implemented a fix in 784e509bded, Theo, WDYT? Could this be used on =
other C-like modes, too?

Yuan=




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#60398; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 29 Dec 2022 07:49:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Dec 29 02:49:22 2022
Received: from localhost ([127.0.0.1]:59179 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1pAnfG-0000bl-AG
	for submit <at> debbugs.gnu.org; Thu, 29 Dec 2022 02:49:22 -0500
Received: from lists.gnu.org ([209.51.188.17]:46778)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <kahatlen@HIDDEN>) id 1pAnfE-0000bd-OL
 for submit <at> debbugs.gnu.org; Thu, 29 Dec 2022 02:49:21 -0500
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 <kahatlen@HIDDEN>)
 id 1pAnfE-0001ZN-9y
 for bug-gnu-emacs@HIDDEN; Thu, 29 Dec 2022 02:49:20 -0500
Received: from mail-lj1-x22e.google.com ([2a00:1450:4864:20::22e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <kahatlen@HIDDEN>)
 id 1pAnfB-0006mW-1G
 for bug-gnu-emacs@HIDDEN; Thu, 29 Dec 2022 02:49:18 -0500
Received: by mail-lj1-x22e.google.com with SMTP id s25so18706203lji.2
 for <bug-gnu-emacs@HIDDEN>; Wed, 28 Dec 2022 23:49:14 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:message-id:date:subject:to:from:from:to:cc:subject
 :date:message-id:reply-to;
 bh=XA9dwz9JMrmzzkmsGR84CsoetBTpDueT1NKofcJiHzI=;
 b=DHE6MSH3zt645cBT/dkG/wqlHHS8q4/IsOSnCMYlZprCrOnv1aQv+oJybnOPKxr7H+
 ANsn2wuvadlabgYVi2CLW61IhTfsHH8Sr221HEPu4Xb0k3n0kKU7cD6cw+e92LeCDjZy
 DHfclcuc5+Bth/6EIakt9+cu/PcC8wRDpquYz0Btz+1zTf8jx1NKLdo8rHQxXjPiDYR2
 LdYjbimFb07D2ogQVhd5tB7OqKP5KTiC0bQsGYlaZJ0Gxswv5MHQeAOVMwiwKBt6Qxqr
 qq0QIgYah1qNpzOV6PDuzcL7Q8ZBU2adZIy8D3dufKI2urtbEzNRQ0A8MTDGNj2NZrYL
 CEhg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=mime-version:message-id:date:subject:to:from:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=XA9dwz9JMrmzzkmsGR84CsoetBTpDueT1NKofcJiHzI=;
 b=jCeEFT4eBAvE/OX4lDZ007E7xfqp0ewBNOsHuwWY8drJ0EDOAHwLz2P/8HOybE2xUX
 NukNgkHh8w6BUlcqEghGDGGfYA6lOvS5HLA/XC6GuydZ5BP0iH9XPXouuzVVk17Zb5jI
 pDbIZdql0q+wkN2wB/OCk8Agia+IVh5sWCqAlp+hZUx3nv4e4bcUV8RYUi7xC1ANE+4n
 ZpyigsbQJPcS26S6ntM77pGsLMh3GXHbYIfeF18BMok6RsW9f91DkUJLKeBO4RW0+K/d
 eoEBCOoU33AxzadAF0IrHz3H//eJZTGuMnLCpQCZkX7pXFvnNXurN3OzRoNojytypy8w
 QweQ==
X-Gm-Message-State: AFqh2koGuzWPG3UYKsPzG0fWgbzZU+zyUlZwNR5qjR2mmqxsdGxAkR4i
 VOqzOZHswFYDF7RaLMRPNsNKb2pHmw==
X-Google-Smtp-Source: AMrXdXvZl5CfXb2M/CM9gvKciWd0DIveCdbJRrivc/me1eZCFEvp9DaFS3yCoIOI8jy2ptEKXVk5mA==
X-Received: by 2002:a05:651c:2125:b0:27b:5890:e84f with SMTP id
 a37-20020a05651c212500b0027b5890e84fmr8586082ljq.53.1672300151252; 
 Wed, 28 Dec 2022 23:49:11 -0800 (PST)
Received: from dell ([2a02:1660:692e:dd00::44c])
 by smtp.gmail.com with ESMTPSA id
 q18-20020a2eb4b2000000b0027713ef5360sm2215709ljm.71.2022.12.28.23.49.10
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 28 Dec 2022 23:49:10 -0800 (PST)
From: Knut Anders Hatlen <kahatlen@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 29.0.60; c++-ts-mode: Strange indentation of function body when
 parameter list has newline
Date: Thu, 29 Dec 2022 08:49:07 +0100
Message-ID: <87y1qqd4zw.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2a00:1450:4864:20::22e;
 envelope-from=kahatlen@HIDDEN; helo=mail-lj1-x22e.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)


Function bodies are indented strangely in c++-ts-mode if the parameter
list has a newline between two parameters. For example:

int f1(int x, int y) {
  // Indented as expected.
  return x + y;
}

int f2(int x,
       int y) {
	 // Indented too much.
	 return x + y;
       };



In GNU Emacs 29.0.60 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.35, cairo version 1.16.0) of 2022-12-29 built on dell
Repository revision: 909091d7578b7225601b202fb9257dedae879e9a
Repository branch: emacs-29
System Description: Debian GNU/Linux bookworm/sid

Configured using:
 'configure --with-json --with-xml2 --with-modules
 --prefix=/usr/local/stow/emacs --with-pgtk --without-x
 --with-native-compilation --with-tree-sitter'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBOTF LIBSELINUX LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY
PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB

Important settings:
  value of $LANG: nn_NO.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: C++

Minor modes in effect:
  shell-dirtrack-mode: t
  treesit-explore-mode: t
  flyspell-mode: t
  hl-line-mode: t
  electric-pair-mode: t
  display-line-numbers-mode: t
  elide-head-mode: t
  flymake-mode: t
  winner-mode: t
  windmove-mode: t
  server-mode: t
  which-function-mode: t
  savehist-mode: t
  save-place-mode: t
  repeat-mode: t
  recentf-mode: t
  minibuffer-depth-indicate-mode: t
  marginalia-mode: t
  global-so-long-mode: t
  global-auto-revert-mode: t
  dynamic-completion-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tab-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/kah/.emacs.d/elpa/29/transient-0.3.7/transient hides /usr/local/stow/emacs/share/emacs/29.0.60/lisp/transient

Features:
(ecomplete nndraft nnmh format-spec nnml utf-7 nnfolder nnnil gnus-agent
gnus-srvr gnus-score score-mode nnvirtual gnus-msg nntp gnus-cache
gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum shr
pixel-fill kinsoku url-file svg dom gnus-group gnus-undo gnus-start
gnus-dbus dbus xml gnus-cloud nnimap nnmail mail-source utf7 nnoo
parse-time iso8601 gnus-spec gnus-int gnus-range gnus-win gnus nnheader
range gnutls epa-file network-stream nsm mailalias smtpmail textsec
uni-scripts idna-mapping ucs-normalize uni-confusable textsec-check
dabbrev shadow sort mail-extr emacsbug message yank-media puny dired
dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils shell pcomplete cus-start pulse color noutline
outline jka-compr find-func orderless cl-print cc-langs cc-mode cc-fonts
cc-guess cc-menus cc-cmds help-fns radix-tree cc-styles cc-align
cc-engine cc-vars cc-defs mule-util etags fileloop generator xref
misearch multi-isearch vc-git diff-mode easy-mmode vc-dispatcher
c-ts-mode treesit add-log comp comp-cstr flyspell ispell hl-line
elec-pair display-line-numbers elide-head time-date checkdoc lisp-mnt
flymake-proc flymake project compile text-property-search comint
ansi-osc ansi-color warnings thingatpt cus-edit pp rx winner ring
windmove disp-table server icons cl-extra help-mode which-func imenu
savehist saveplace repeat recentf tree-widget wid-edit mb-depth
marginalia magit-autorevert magit-git magit-section magit-utils crm dash
so-long autorevert filenotify completion cus-load embark-autoloads
boxquote-autoloads slime-autoloads marginalia-autoloads
orderless-autoloads info package browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie generate-lisp-file
url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq
eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv
bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip
cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/pgtk-win pgtk-win term/common-win pgtk-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq
simple cl-generic indonesian philippine cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese composite emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button
loaddefs theme-loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget keymap hashtable-print-readable backquote threads dbusbind
inotify dynamic-setting system-font-setting font-render-setting cairo
gtk pgtk lcms2 multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 609784 42800)
 (symbols 48 25180 7)
 (strings 32 147262 8978)
 (string-bytes 1 4799636)
 (vectors 16 103201)
 (vector-slots 8 1470136 46014)
 (floats 8 715 280)
 (intervals 56 4101 1275)
 (buffers 984 27))

-- 
Knut Anders




Acknowledgement sent to Knut Anders Hatlen <kahatlen@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#60398; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 8 Jan 2023 00:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.