GNU bug report logs - #61026
29.0.60; c-ts-mode: Broken indentation for loops and conditions without brace

Previous Next

Package: emacs;

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

Date: Mon, 23 Jan 2023 11:18:02 UTC

Severity: normal

Found in version 29.0.60

Full log


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

From: Mohammed Sadiq <sadiq <at> sadiqpk.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.60; c-ts-mode: Broken indentation for loops and conditions
 without brace
Date: Mon, 23 Jan 2023 16:47:38 +0530
The following code has broken indentation with c-ts-mode:

  while (true)
    if (true) {
    puts ("Hello");
  }

  if (true)
    if (true)
      {
      puts ("World");
    }

For which, I expect to get the following indentation (with default 
config):

  while (true)
    if (true) {
      puts ("Hello");
    }

  if (true)
    if (true)
      {
        puts ("World");
      }



In GNU Emacs 29.0.60 (build 6, x86_64-pc-linux-gnu, GTK+ Version
 3.24.36, cairo version 1.16.0) of 2023-01-23 built on purism
Repository revision: e6c5f32e77dceed4e26b16889cc56547093bdc45
Repository branch: emacs-29
Windowing system distributor 'The X.Org Foundation', version 
11.0.12101006
System Description: Debian GNU/Linux bookworm/sid




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

Previous Next


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