bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61026: 29.0.60; c-ts-mode: Broken indentation for loops and conditio


From: Knut Anders Hatlen
Subject: bug#61026: 29.0.60; c-ts-mode: Broken indentation for loops and conditions without brace
Date: Sun, 05 Feb 2023 21:32:44 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Hi,

I'm still seeing odd indentation for conditions without braces. For
example, invoking c-ts-mode-indent-defun (C-c C-q) with the point inside
this function ...

int f(int x) {
if (x > 1)
return x;
else
return x + 1;
}

... results in the following indentation with the default GNU style:

int f(int x) {
  if (x > 1)
return x;
  else
return x + 1;
}

I would have expected this:

int f(int x) {
  if (x > 1)
    return x;
  else
    return x + 1;
}

Is something more needed for this bug, or is the problem I'm seeing a
different bug?

-- 
Knut Anders





reply via email to

[Prev in Thread] Current Thread [Next in Thread]