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

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

bug#60443: 29.0.60; c-ts-mode: Consider re-using c-file-style and c-bas


From: Yuan Fu
Subject: bug#60443: 29.0.60; c-ts-mode: Consider re-using c-file-style and c-basic-offset
Date: Sun, 1 Jan 2023 16:24:07 -0800

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 31/12/2022 06:02, Yuan Fu wrote:
>> IIUC part of the reason why we created separate major modes is that
>> we don’t want to share configuration variables between the
>> tree-sitter and elisp implementation. If they share some of the
>> configuration variable but not all, it would be very confusing; it
>> they share all variables, well that’s not possible because c-ts-mode
>> doesn’t support all of c-mode’s features.
>
> js-ts-mode uses js-indent-level. css-ts-mode uses css-indent-offset.
> python-ts-mode and bash-ts-mode don't have their own indentation
> settings, so I suppose they reuse the "regular" indentation code.
>
> There are a lot of other ts modes which don't have anything to reuse
> ("regular" mode is not in Emacs).
>
> FWIW, that's my plan for ruby-ts-mode: to share those options where
> it's feasible, to avoid random duplication, and to make comparing and
> switching easier. The test suite can be shared more easily too.

Hmm, yes, those modes live in the same file, and can be considered the
same package. c-ts-mode.el is separate from cc-mode.el so it makes less
sense to share variables.  Maybe we can say "same package, share vars,
different package, different vars", to avoid confusion?


Yuan





reply via email to

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