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#72263: 31.0.50; Wrong indentation c++-ts-mode Date: Thu, 25 Jul 2024 10:29:47 +0300 Message-ID: <86h6ce53pw.fsf@gnu.org> References: <87cyn3vequ.fsf.ref@aol.com> <87cyn3vequ.fsf@aol.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37616"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 72263@debbugs.gnu.org To: Ergus , Yuan Fu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 25 09:31:27 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 1sWswg-0009cv-IU for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Jul 2024 09:31:26 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sWswR-0005H9-6x; Thu, 25 Jul 2024 03:31:11 -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 1sWswC-0004o9-2W for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 03:30:57 -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 1sWswB-0006BS-5k for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 03:30:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sWswI-0005Lq-0D for bug-gnu-emacs@gnu.org; Thu, 25 Jul 2024 03:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Jul 2024 07:31: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.172189261220506 (code B ref 72263); Thu, 25 Jul 2024 07:31:01 +0000 Original-Received: (at 72263) by debbugs.gnu.org; 25 Jul 2024 07:30:12 +0000 Original-Received: from localhost ([127.0.0.1]:35401 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWsvT-0005Kg-Ng for submit@debbugs.gnu.org; Thu, 25 Jul 2024 03:30:12 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52040) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sWsvS-0005JH-0E for 72263@debbugs.gnu.org; Thu, 25 Jul 2024 03:30:10 -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 1sWsvE-0005jL-DL; Thu, 25 Jul 2024 03:29:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=wra+qjXTZku49/1YCEGwbSqoWLieXIhKqDP1kAoBphs=; b=qLYADyBP/Bw9 sa7kYwuX3aY00qaUME03EfrxxESVIxVv/iuZNeJF19WXKBriB0VIAlaJYeInoJosv9lnrR5whUjtR zbTvvggIY0hV83fm4hKyNjyWUkx+4JHBbOpG4+JBkqoMr4jCWe6Ao+SoLdQaJKdL5Q9sr21i2M1PQ kYRwKRNUR9f4936znGFKmv5SGqTXFcT83lJChcZ9vuvWYxVpLLcuxjZVCbfAUU/WdvxlnGKrFGAgC sOpiZCdUkKN8QewnXwgioBF4d38l7y6xsAE12Rq4ehsVYeZIT0POrIBRJz4DEzV+Tq7Zuw4z9uAQA wQ1QQE2nla76gkFBY0rw4A==; In-Reply-To: <87cyn3vequ.fsf@aol.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:289279 Archived-At: > Date: Wed, 24 Jul 2024 02:02:33 +0200 > From: Ergus via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > When using c++-ts-mode there is an indentation issue apparently related > with namespaces+templates. > > c-ts-mode-indent-style 'linux (but with 'gnu also happens) > > ``` > namespace A { > > T myfunction1(const char *fname) > { > } > > template > T myfunction2(const char *fname) > { > } > > } > ``` > > The myfunction2 may be indented as expected, but it is not. > > The explorer shows: > > ``` > (translation_unit > (namespace_definition namespace name: (namespace_identifier) > body: > (declaration_list { > (function_definition type: (primitive_type) > declarator: > (function_declarator declarator: (identifier) > parameters: > (parameter_list ( > (parameter_declaration > (type_qualifier const) > type: (primitive_type) > declarator: (pointer_declarator * declarator: (identifier))) > ))) > body: (compound_statement { })) > (template_declaration template > parameters: > (template_parameter_list < > (type_parameter_declaration class (type_identifier)) > >) > (function_definition type: (type_identifier) > declarator: > (function_declarator declarator: (identifier) > parameters: > (parameter_list ( > (parameter_declaration > (type_qualifier const) > type: (primitive_type) > declarator: (pointer_declarator * declarator: (identifier))) > ))) > body: (compound_statement { }))) > }))) > ``` Yuan, can you take a look, please?