GNU bug report logs - #61502
29.0.60; c-ts-mode auto-indent not working

Previous Next

Package: emacs;

Reported by: Pankaj Jangid <pankaj <at> codeisgreat.org>

Date: Tue, 14 Feb 2023 04:37:01 UTC

Severity: normal

Found in version 29.0.60

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Theodor Thornhill <theo <at> thornhill.no>
Cc: 61502 <at> debbugs.gnu.org, casouri <at> gmail.com, pankaj <at> codeisgreat.org
Subject: bug#61502: 29.0.60; c-ts-mode auto-indent not working
Date: Wed, 15 Feb 2023 19:30:48 +0200
> Date: Wed, 15 Feb 2023 18:14:46 +0100
> From: Theodor Thornhill <theo <at> thornhill.no>
> CC: pankaj <at> codeisgreat.org, casouri <at> gmail.com, 61502 <at> debbugs.gnu.org
> 
> >Look back for the first line that has something other than whitespace?
> 
> Yeah, we could. But what then with
> 
> for (
>      ;;)
> |
> 
> ?
> 
> Not saying it's impossible, but we will get complexity that may be hard to get into emacs-29, i think.

At some point we will have to rely on electric characters to fix the
indentation later.  We just need to try to fix the more blatant and
simple situations, I think, and punt (for now) where it becomes hairy.

I wonder, though: what do other IDEs which use tree-sitter do in these
cases?




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

Previous Next


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