From: Yuan Fu <casouri@gmail.com>
To: Mohammed Sadiq <sadiq@sadiqpk.org>
Cc: 60443@debbugs.gnu.org
Subject: bug#60443: 29.0.60; c-ts-mode: Consider re-using c-file-style and c-basic-offset
Date: Fri, 30 Dec 2022 20:02:55 -0800 [thread overview]
Message-ID: <0F02DC00-451E-4375-B436-7DB398E4DFB7@gmail.com> (raw)
In-Reply-To: <0e9e8e06451e13d7bee3fd0c04939902@sadiqpk.org>
> On Dec 30, 2022, at 7:17 PM, Mohammed Sadiq <sadiq@sadiqpk.org> wrote:
>
> It would be nice if c-ts-mode respects c-file-style and c-basic-offset
> instead of its own variables. Also I wish c-ts-mode respects other c-mode
> variables (ie, cc-styles.el) so that I could use the same c-mode conf for
> c-ts-mode too, eg., I could use:
>
> /* -*- c-file-style: "gnu"; c-basic-offset: 4; -*- */
>
> as file variables which would work both in c-mode and c-ts-mode, or the
> following in dir-locals:
>
> ((nil . ((fill-column . 80)))
> (c-ts-mode . ((c-file-style . "GNU")
> (c-file-offsets
> (brace-list-intro . +)))))
>
> Whether the mode used for C source file is c-ts-mode or c-mode is an
> implementation detail as far as the settings are concerned (because I
> don't want different styles for my code depending on the mode used).
>
> I'm not asking about implementing the spacing and indentation rules, but
> when they do, it would be nice if they re-use the same c-mode variable
> names.
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. Also, since c-ts-mode and c-mode’s implementation differs greatly, some of c-mode’s configuration wouldn’t make sense, or is hard to recreate, in c-ts-mode.
I’m sorry that there will inevitably be differences between c-ts-mode and c-mode. We’ll try to minimize the annoyance but it won’t be perfect.
Yuan
next prev parent reply other threads:[~2022-12-31 4:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-31 3:17 bug#60443: 29.0.60; c-ts-mode: Consider re-using c-file-style and c-basic-offset Mohammed Sadiq
2022-12-31 4:02 ` Yuan Fu [this message]
2022-12-31 10:31 ` Dmitry Gutov
2023-01-02 0:24 ` Yuan Fu
2023-01-02 1:30 ` Dmitry Gutov
2023-01-08 0:42 ` Yuan Fu
2023-01-08 8:40 ` Mohammed Sadiq
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0F02DC00-451E-4375-B436-7DB398E4DFB7@gmail.com \
--to=casouri@gmail.com \
--cc=60443@debbugs.gnu.org \
--cc=sadiq@sadiqpk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.