all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Yuan Fu <casouri@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Ergus <spacibba@aol.com>, 72263@debbugs.gnu.org
Subject: bug#72263: 31.0.50; Wrong indentation c++-ts-mode
Date: Thu, 25 Jul 2024 00:53:16 -0700	[thread overview]
Message-ID: <C49953B4-5FFC-41D7-AF4E-3343023B1F0E@gmail.com> (raw)
In-Reply-To: <86h6ce53pw.fsf@gnu.org>



> On Jul 25, 2024, at 12:29 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> Date: Wed, 24 Jul 2024 02:02:33 +0200
>> From:  Ergus via "Bug reports for GNU Emacs,
>> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>> 
>> 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 <class T>
>> 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?

Yeah let me take a look.

Yuan




  reply	other threads:[~2024-07-25  7:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87cyn3vequ.fsf.ref@aol.com>
2024-07-24  0:02 ` bug#72263: 31.0.50; Wrong indentation c++-ts-mode Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-25  7:29   ` Eli Zaretskii
2024-07-25  7:53     ` Yuan Fu [this message]
2024-07-31 21:09       ` Ergus via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-08-01  5:06         ` Eli Zaretskii
2024-08-01  7:03           ` Yuan Fu
2024-08-17  7:28             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C49953B4-5FFC-41D7-AF4E-3343023B1F0E@gmail.com \
    --to=casouri@gmail.com \
    --cc=72263@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=spacibba@aol.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.