GNU bug report logs - #68493
Got to be a better way to customize c-ts-mode indentation

Previous Next

Package: emacs;

Reported by: Daniel Colascione <dancol <at> dancol.org>

Date: Mon, 15 Jan 2024 23:52:02 UTC

Severity: normal

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Daniel Colascione <dancol <at> dancol.org>
Cc: 68493 <at> debbugs.gnu.org
Subject: Re: bug#68493: Got to be a better way to customize c-ts-mode
 indentation
Date: Tue, 16 Jan 2024 14:19:13 +0200
> From: Daniel Colascione <dancol <at> dancol.org>
> Date: Mon, 15 Jan 2024 18:51:25 -0500
> 
> There's got to be a way to customize tree-sitter-based indentation
> that's cleaner than the patching I'm doing below.

Agreed.  Patches welcome.

> Wouldn't it be nice if we could use cc-mode indentation rules with
> c-ts-mode?

It would, indeed.  Of course, it isn't easy: CC Mode's indentation
rules are defined in terms of pseudo-syntactic parameters that don't
map easily (to say the least) into what a parser returns, and many of
the rules invoke CC Mode functions (as opposed to reference variables
and literals) that are specific to CC Mode and its analysis of the C
source.  Again, patches welcome.




This bug report was last modified 1 year and 151 days ago.

Previous Next


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