GNU bug report logs - #60496
29.0.60; c-ts-mode: Broken indentation with linux style conditionals

Previous Next

Package: emacs;

Reported by: Mohammed Sadiq <sadiq <at> sadiqpk.org>

Date: Mon, 2 Jan 2023 15:58:01 UTC

Severity: normal

Merged with 59686, 60398

Found in versions 29.0.60, 30.0.50

Full log


View this message in rfc822 format

From: Mohammed Sadiq <sadiq <at> sadiqpk.org>
To: Yuan Fu <casouri <at> gmail.com>
Cc: 60496 <at> debbugs.gnu.org
Subject: bug#60496: 29.0.60; c-ts-mode: Broken indentation with linux style conditionals
Date: Tue, 03 Jan 2023 14:39:52 +0530
On 2023-01-03 03:59, Yuan Fu wrote:
> Mohammed Sadiq <sadiq <at> sadiqpk.org> writes:
> 
>> Indentation of the following C code with linux style is broken:
>> 
>> int main (void)
>> {
>>   if (a) {
>>     func_a ();
>>   } else if (b) {
>> 	   func_b ();
>> 	 } else {
>> 	   func_c ();
>> 	 }
>> }
>> 
> 
> Thanks. I’m not familiar with the linux style, is the problem with the
> closing brackets? Could you give me a correct example so I know exactly
> what’s wrong?
> 
> Yuan


The expected indentation style for the given code (this one is provided
by c-mode), with the default indentation values:

int
main (void)
{
  if (a) {
    func_a ();
  } else if (b) {
    func_b ();
  } else {
    func_c ();
  }
}




This bug report was last modified 2 years and 150 days ago.

Previous Next


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