GNU bug report logs - #61997
30.0.50; c++-ts-mode;cannot indent in an empty function body

Previous Next

Package: emacs;

Reported by: xhcoding <xhcoding <at> foxmail.com>

Date: Mon, 6 Mar 2023 07:52:02 UTC

Severity: normal

Found in version 30.0.50

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #17 received at 61997 <at> debbugs.gnu.org (full text, mbox):

From: Yuan Fu <casouri <at> gmail.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: xhcoding <at> foxmail.com, Eli Zaretskii <eliz <at> gnu.org>, 61997 <at> debbugs.gnu.org
Subject: Re: bug#61997: 30.0.50; c++-ts-mode;cannot indent in an empty 
 function body
Date: Tue, 7 Mar 2023 16:44:52 -0800
Dmitry Gutov <dgutov <at> yandex.ru> writes:

> On 06/03/2023 14:57, Eli Zaretskii wrote:
>>> Date: Mon, 06 Mar 2023 11:03:51 +0800
>>> From: xhcoding<xhcoding <at> foxmail.com>
>>>
>>>
>>> When the cursor is at the position of the following code,
>>> pressing tab cannot indent to the correct position.
>>>
>>> int add() {
>>> |  <-- pressing tab can not indent
>>> }
>>>
>>> The expected position after pressing the tab:
>>>
>>> int add() {
>>>    |
>>> }
>> I think you are supposed to switch the indentation style to bsd, and
>> then it will work.  The default is gnu.
>
> Using the gnu style, most of the expressions that the user will type
> will indent with OFFET number of characters, right?
>
> Then it makes sense to indent the open line like that, too.

Right. I fixed this regression on emacs-29.

Yuan




This bug report was last modified 1 year and 256 days ago.

Previous Next


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