all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#61997: 30.0.50; c++-ts-mode; cannot indent in an empty function body
@ 2023-03-06  3:03 xhcoding
  2023-03-06 12:57 ` Eli Zaretskii
  2023-03-08  0:44 ` Yuan Fu
  0 siblings, 2 replies; 6+ messages in thread
From: xhcoding @ 2023-03-06  3:03 UTC (permalink / raw)
  To: 61997


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() {
  |
}



In GNU Emacs 30.0.50 (build 6, x86_64-w64-mingw32)
Repository revision: 6fb8a4dff7ef22f96ebe1a775240617aabac6526
Repository branch: master
Windowing system distributor 'Microsoft Corp.', version 10.0.22621
System Description: Microsoft Windows 10 Home China (v10.0.2009.22621.1105)






^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#61997: 30.0.50; c++-ts-mode; cannot indent in an empty function body
  2023-03-06  3:03 bug#61997: 30.0.50; c++-ts-mode; cannot indent in an empty function body xhcoding
@ 2023-03-06 12:57 ` Eli Zaretskii
  2023-03-06 13:11   ` Dmitry Gutov
  2023-03-06 13:13   ` xhcoding
  2023-03-08  0:44 ` Yuan Fu
  1 sibling, 2 replies; 6+ messages in thread
From: Eli Zaretskii @ 2023-03-06 12:57 UTC (permalink / raw)
  To: xhcoding; +Cc: 61997

> Date: Mon, 06 Mar 2023 11:03:51 +0800
> From: xhcoding <xhcoding@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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#61997: 30.0.50; c++-ts-mode; cannot indent in an empty function body
  2023-03-06 12:57 ` Eli Zaretskii
@ 2023-03-06 13:11   ` Dmitry Gutov
  2023-03-06 13:13   ` xhcoding
  1 sibling, 0 replies; 6+ messages in thread
From: Dmitry Gutov @ 2023-03-06 13:11 UTC (permalink / raw)
  To: Eli Zaretskii, xhcoding; +Cc: 61997

On 06/03/2023 14:57, Eli Zaretskii wrote:
>> Date: Mon, 06 Mar 2023 11:03:51 +0800
>> From: xhcoding<xhcoding@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.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#61997: 30.0.50; c++-ts-mode; cannot indent in an empty function body
  2023-03-06 12:57 ` Eli Zaretskii
  2023-03-06 13:11   ` Dmitry Gutov
@ 2023-03-06 13:13   ` xhcoding
  1 sibling, 0 replies; 6+ messages in thread
From: xhcoding @ 2023-03-06 13:13 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: xhcoding, 61997

On Tue, 07 Mar 2023 04:57:09 +0800,
Eli Zaretskii wrote:
> 
> > Date: Mon, 06 Mar 2023 11:03:51 +0800
> > From: xhcoding <xhcoding@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.

Thank you very much, the bsd style is what I want.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#61997: 30.0.50; c++-ts-mode; cannot indent in an empty  function body
  2023-03-06  3:03 bug#61997: 30.0.50; c++-ts-mode; cannot indent in an empty function body xhcoding
  2023-03-06 12:57 ` Eli Zaretskii
@ 2023-03-08  0:44 ` Yuan Fu
  2023-09-12  0:52   ` Stefan Kangas
  1 sibling, 1 reply; 6+ messages in thread
From: Yuan Fu @ 2023-03-08  0:44 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: xhcoding, Eli Zaretskii, 61997


Dmitry Gutov <dgutov@yandex.ru> writes:

> On 06/03/2023 14:57, Eli Zaretskii wrote:
>>> Date: Mon, 06 Mar 2023 11:03:51 +0800
>>> From: xhcoding<xhcoding@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





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#61997: 30.0.50; c++-ts-mode; cannot indent in an empty function body
  2023-03-08  0:44 ` Yuan Fu
@ 2023-09-12  0:52   ` Stefan Kangas
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Kangas @ 2023-09-12  0:52 UTC (permalink / raw)
  To: Yuan Fu; +Cc: xhcoding, Eli Zaretskii, 61997-done, Dmitry Gutov

Yuan Fu <casouri@gmail.com> writes:

> Right. I fixed this regression on emacs-29.

It seems like this issue was fixed, but it was left open in the bug
tracker.  I'm therefore closing it now.

Please remember to close bug reports when they are fixed.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-09-12  0:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-06  3:03 bug#61997: 30.0.50; c++-ts-mode; cannot indent in an empty function body xhcoding
2023-03-06 12:57 ` Eli Zaretskii
2023-03-06 13:11   ` Dmitry Gutov
2023-03-06 13:13   ` xhcoding
2023-03-08  0:44 ` Yuan Fu
2023-09-12  0:52   ` Stefan Kangas

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.