From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs Subject: bug#72263: 31.0.50; Wrong indentation c++-ts-mode Date: Thu, 25 Jul 2024 00:53:16 -0700 Message-ID: References: <87cyn3vequ.fsf.ref@aol.com> <87cyn3vequ.fsf@aol.com> <86h6ce53pw.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.600.62\)) 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="8523"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Ergus , 72263@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 25 09:55: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 1sWtJY-00025n-4k for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Jul 2024 09:55:04 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWtJQ-0006CE-Sx; Thu, 25 Jul 2024 03:54:56 -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 1sWtJP-0006Br-3I for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 03:54:55 -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 1sWtJO-0005n1-RA for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 03:54:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sWtJV-0005yy-MV for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 03:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Jul 2024 07:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72263 X-GNU-PR-Package: emacs Original-Received: via spool by 72263-submit@debbugs.gnu.org id=B72263.172189407922962 (code B ref 72263); Thu, 25 Jul 2024 07:55:01 +0000 Original-Received: (at 72263) by debbugs.gnu.org; 25 Jul 2024 07:54:39 +0000 Original-Received: from localhost ([127.0.0.1]:35468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWtJ9-0005yI-FI for submit@debbugs.gnu.org; Thu, 25 Jul 2024 03:54:39 -0400 Original-Received: from mail-pf1-f173.google.com ([209.85.210.173]:45161) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWtJ7-0005y9-Ck for 72263@debbugs.gnu.org; Thu, 25 Jul 2024 03:54:38 -0400 Original-Received: by mail-pf1-f173.google.com with SMTP id d2e1a72fcca58-70d18d4b94cso511774b3a.2 for <72263@debbugs.gnu.org>; Thu, 25 Jul 2024 00:54:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721894009; x=1722498809; darn=debbugs.gnu.org; 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=yDz08HHb0XykTwaHBDOedmf+QmGfSBc9Ozc7edConb0=; b=b3vr/veu2ECVdy0noTkpk4YMSGIgprT6ACMzCE8FcVGJ4WE/OCjNwG77N6PLUhcDKR LuPMn5ws19T8vG7VZLnb249RfZRs9ApzqMQd851QWx6MA+8HICk9XKdzwifwMTwrHEYU 9JgYnNUG1YPzOHkham8djDR4Ryj6wqVq/dEuvio4gBgRwHmucJrr/dqJEwlKuDHVHln8 /vA7CXiR4mqyObaxjsL1nbi5UCoks4UFF0wSiooEC/tCoHFyXzEcMNny9iAqeLLXb47G bXltzUbGRknyD1L+ZS0LyUpjP51gn+3dwkTOKCOOheQmr/VdYTap/+I54qT3XF3NTG5O 27kQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721894009; x=1722498809; 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=yDz08HHb0XykTwaHBDOedmf+QmGfSBc9Ozc7edConb0=; b=eYXMA4aV/WhdFcGfYzX0KW/oTVhD4t40hrcBtrZZK/bAUz+MjVGR9ZVLJ39t3msSOI 9H24I+LpTOHr0ScBuFhEJ1+peB1ukoSHF1NLMcJ09ecxFuxYg9sTjnpszplT0UlR/oFq EWeE0gD/U97E/cSp52svcj2Uvocn7Wpnc206FvnpJ5grjLVO8pc0CC6BzHQdZPTII9rk Z2DlBJkbbJZ7HC59VZO6EHpjxNIRa/bKz+O0S4CqO3GP9t8EJ8ElBykiWVVJqbS6Wvqi JlkyUuegzhunKjGp6hIev/k9q4AeaU6+q4oHb7CWHRV8vYti7b3y94RwzdyxtMLNRkNC 9JAA== X-Forwarded-Encrypted: i=1; AJvYcCUqoEMyt62DcJG4C3gyLCVUbyGUkzxFx5SBMD1pgMNSpvgWSHKS8i3mqKd01lhqvP/PJVaD2iyC4wCuzEQe2LRLVIzE78E= X-Gm-Message-State: AOJu0YxMQ+5mtN1p+ANqJwpMVEY8hABj7rn/YAcQqgOWVDv4Wf9wtcnC 6C0JL0f+C99B680MnLldnnVvhRc7cLjLWok6taSxDrU31XpawgEMJU3Ocg== X-Google-Smtp-Source: AGHT+IEc49U/HqVhH8AHXrmzGIBvi5vwChUuNvClglKFajrUkg5wmsyr4t/6NC3S2M2aU6BDaJEh4A== X-Received: by 2002:a05:6a00:928a:b0:705:c0a1:61c9 with SMTP id d2e1a72fcca58-70eaa88c6fdmr2263408b3a.9.1721894009526; Thu, 25 Jul 2024 00:53:29 -0700 (PDT) Original-Received: from smtpclient.apple ([2601:646:8f81:6120:f9a7:9274:d0c2:c842]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-70ead6e188asm635821b3a.41.2024.07.25.00.53.28 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jul 2024 00:53:28 -0700 (PDT) In-Reply-To: <86h6ce53pw.fsf@gnu.org> X-Mailer: Apple Mail (2.3774.600.62) 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:289287 Archived-At: > On Jul 25, 2024, at 12:29=E2=80=AFAM, Eli Zaretskii = wrote: >=20 >> Date: Wed, 24 Jul 2024 02:02:33 +0200 >> From: Ergus via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >>=20 >> When using c++-ts-mode there is an indentation issue apparently = related >> with namespaces+templates. >>=20 >> c-ts-mode-indent-style 'linux (but with 'gnu also happens) >>=20 >> ``` >> namespace A { >>=20 >> T myfunction1(const char *fname) >> { >> } >>=20 >> template >> T myfunction2(const char *fname) >> { >> } >>=20 >> } >> ``` >>=20 >> The myfunction2 may be indented as expected, but it is not. >>=20 >> The explorer shows: >>=20 >> ``` >> (translation_unit >> (namespace_definition namespace name: (namespace_identifier) >> body:=20 >> (declaration_list { >> (function_definition type: (primitive_type) >> declarator:=20 >> (function_declarator declarator: (identifier) >> parameters:=20 >> (parameter_list ( >> (parameter_declaration >> (type_qualifier const) >> type: (primitive_type) >> declarator: (pointer_declarator * declarator: (identifier))) >> ))) >> body: (compound_statement { })) >> (template_declaration template >> parameters:=20 >> (template_parameter_list < >> (type_parameter_declaration class (type_identifier)) >>> ) >> (function_definition type: (type_identifier) >> declarator:=20 >> (function_declarator declarator: (identifier) >> parameters:=20 >> (parameter_list ( >> (parameter_declaration >> (type_qualifier const) >> type: (primitive_type) >> declarator: (pointer_declarator * declarator: (identifier))) >> ))) >> body: (compound_statement { }))) >> }))) >> ``` >=20 > Yuan, can you take a look, please? Yeah let me take a look. Yuan=