From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.bugs 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 Message-ID: <0F02DC00-451E-4375-B436-7DB398E4DFB7@gmail.com> References: <0e9e8e06451e13d7bee3fd0c04939902@sadiqpk.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9815"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 60443@debbugs.gnu.org To: Mohammed Sadiq Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 31 05:04:15 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pBT6U-0002ND-Pa for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 31 Dec 2022 05:04:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBT6K-0001HH-1A; Fri, 30 Dec 2022 23:04:04 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBT6I-0001H9-MG for bug-gnu-emacs@gnu.org; Fri, 30 Dec 2022 23:04:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pBT6I-0006n4-DB for bug-gnu-emacs@gnu.org; Fri, 30 Dec 2022 23:04:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pBT6H-000580-Tq for bug-gnu-emacs@gnu.org; Fri, 30 Dec 2022 23:04:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Yuan Fu Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Dec 2022 04:04:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60443 X-GNU-PR-Package: emacs Original-Received: via spool by 60443-submit@debbugs.gnu.org id=B60443.167245938519645 (code B ref 60443); Sat, 31 Dec 2022 04:04:01 +0000 Original-Received: (at 60443) by debbugs.gnu.org; 31 Dec 2022 04:03:05 +0000 Original-Received: from localhost ([127.0.0.1]:36359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBT5M-00056n-Nj for submit@debbugs.gnu.org; Fri, 30 Dec 2022 23:03:05 -0500 Original-Received: from mail-pj1-f54.google.com ([209.85.216.54]:51850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pBT5L-00056K-2A for 60443@debbugs.gnu.org; Fri, 30 Dec 2022 23:03:03 -0500 Original-Received: by mail-pj1-f54.google.com with SMTP id n12so11284203pjp.1 for <60443@debbugs.gnu.org>; Fri, 30 Dec 2022 20:03:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=tmZs5gGJrKRqPwLH8oG+rzpyGMMACTkSLr9gcALyGVw=; b=q5pqiSBMzz+57iCd7S6KpgtmKZKgc0FRm8DGhtlxwIy93eW80bgF8mjP2ac8RJuJnj PfYAIGXqXoRzBaj/QWzP/ILsM9ctfk1wJKSowxLLRVImKflA5Ebco165t5saN7Dw+BpL 2iiUfi3n6D6Z0r1l9RQh5hLvVeudv6dvch4zCm7ZgvMpt7/Jo2jMyxcx8EJ9KzsOjJ1L nQxqSUQaDAhH2I3yq1kIgfDx+uYgrB/RZPwfHln5er1OUjvLIm/VOhzP1G5AqkOww0b1 UcrREwmmuaoTKQvM21m2cDJgxw1eid4l0MRc+BI01aCUS+ClsmXHJB9wNIDma2LU56gf 9J2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tmZs5gGJrKRqPwLH8oG+rzpyGMMACTkSLr9gcALyGVw=; b=x15aQkDGtB0UOc2Z7KUdGEYfMirPyeKPyYUxBUC0k8YPLEPrvVVaHV54uYy4sEUU0h 2zeU6Riw/Bl+U1ZZVJzaszcvj0NyyM3mk8zmsoA7SEK4FV253i9OiNJNQJMo0y0btmM0 04eJ/ANvbQvsLbhzuseBOrhcnyOXC0iWUbp2SkQ4kbptyT7cZiGUK/fmojYWeP7K1R/r fUzAFrmoEk+F/8KzAj55m6U4iuZ7+XRdaUntHTbrlqfnismjhhUcV+CGpW2I2jplBOWK 7ChXIhAqWxQwgvzOXMjyCmIOkawAo5hEChNMC/CTlW+lS+9rSSasYExWyafXOW4ctph0 iXDQ== X-Gm-Message-State: AFqh2krEglFWItZegMR7uMO4jRud1MOt0kGEJpT3rf/uT7ta4slNxdPb KcfCAQ591A5H3um7ZBCHnhijd43Ue5Q= X-Google-Smtp-Source: AMrXdXtAkf6jLRNMUYKCOjKFkDMnhIaXDA0Pjc3nwZEANwmz1lyMRsTCAz6+uehTxdPjqpef7utxMw== X-Received: by 2002:a05:6a20:4e1e:b0:9f:2dd1:c2bc with SMTP id gk30-20020a056a204e1e00b0009f2dd1c2bcmr38112045pzb.49.1672459377051; Fri, 30 Dec 2022 20:02:57 -0800 (PST) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id q1-20020a654941000000b0047917991e83sm13538139pgs.48.2022.12.30.20.02.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Dec 2022 20:02:56 -0800 (PST) In-Reply-To: <0e9e8e06451e13d7bee3fd0c04939902@sadiqpk.org> X-Mailer: Apple Mail (2.3696.120.41.1.1) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:252161 Archived-At: > On Dec 30, 2022, at 7:17 PM, Mohammed Sadiq wrote: >=20 > 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: >=20 > /* -*- c-file-style: "gnu"; c-basic-offset: 4; -*- */ >=20 > as file variables which would work both in c-mode and c-ts-mode, or = the > following in dir-locals: >=20 > ((nil . ((fill-column . 80))) > (c-ts-mode . ((c-file-style . "GNU") > (c-file-offsets > (brace-list-intro . +))))) >=20 > 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). >=20 > 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=E2=80=99t 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=E2=80=99s not possible because c-ts-mode = doesn=E2=80=99t support all of c-mode=E2=80=99s features. Also, since = c-ts-mode and c-mode=E2=80=99s implementation differs greatly, some of = c-mode=E2=80=99s configuration wouldn=E2=80=99t make sense, or is hard = to recreate, in c-ts-mode. I=E2=80=99m sorry that there will inevitably be differences between = c-ts-mode and c-mode. We=E2=80=99ll try to minimize the annoyance but it = won=E2=80=99t be perfect. Yuan=