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.devel Subject: Re: Tree sitter support for C-like languages Date: Fri, 11 Nov 2022 22:25:13 -0800 Message-ID: <6C490C09-E6DF-49F8-9B05-3E4B2DF377EC@gmail.com> References: <87tu36em9t.fsf@thornhill.no> <45FD2F78-F15B-488B-9348-A8E298D8AD35@gmail.com> <87v8nmyqqp.fsf@thornhill.no> <8464849C-0F41-40DE-8B7D-08CF37320362@thornhill.no> 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="14240"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Theodor Thornhill Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 12 07:25:46 2022 Return-path: Envelope-to: ged-emacs-devel@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 1otjxa-0003b6-IC for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Nov 2022 07:25:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otjx9-0004Ld-P9; Sat, 12 Nov 2022 01:25:19 -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 1otjx8-0004LR-Km for emacs-devel@gnu.org; Sat, 12 Nov 2022 01:25:18 -0500 Original-Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1otjx7-0003ai-4o for emacs-devel@gnu.org; Sat, 12 Nov 2022 01:25:18 -0500 Original-Received: by mail-pf1-x430.google.com with SMTP id z26so6647503pff.1 for ; Fri, 11 Nov 2022 22:25:16 -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=Pz8zuM6RMSwIENjSSrAL080sxZK1QHzCpEgDRAzxx10=; b=HOL20PmRQSQbA04hd4w0s1yrtvDFJqdbw9Z8XxGdXSDZRUodLT4FommC2Q778p2NgR fgeQoNQwQldjnjCriCFH0EYiT5ArJYySP3KJyTofS71NLpX7j1Hu2wX2ytD9XOQ163wr xko54uNUOvBu4OZuU1fr2/04s99fudo35U61e4yAu40jof3TBecSPjCbBIIVuLCN0we+ elgHgvLtpqIV7byqp4PifruWJkgjxQf7uZCxKYBs5nyySZbWkVf7Ov4H7wOAq3bUeG78 TWgvW1stRUVswm1h/fCGIGG+kcvelyGE/0hy1LqjWsA1V5K+Kw2WiJJs7GIPZr0yTySJ khug== 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=Pz8zuM6RMSwIENjSSrAL080sxZK1QHzCpEgDRAzxx10=; b=apTYiJv3FOK2FKbJxRqEIPY5YSPAEvy9ONLcG5YQs4yDYVSQ/1N/HPKes9tfI28sfx Wu5X9forhz374G4Db2A3bdIQrk4D7KHHIwX1+5nXTlf1Kxu3ZEFfUaNL1uC3S/lNgLYs FzPZEW2s4wRMDkYzCY3u2ejViyhikk2SAOTTm4j/auPv5WpeegZuHYmdjwAbWBL6r3NJ 3ierPFSHYmICbB86DqxvsLCcBlD0mcTTYDzEcwNRPn+HMa7BqtzN4ApkMDDLwI2SbqE6 egov4NJeLYfXsK0hUQYaenx06g6MDRkD7VA8LgHetIt4Kca1ICKJ0UAAA1eTNAksH9Sr Ud0Q== X-Gm-Message-State: ANoB5pkE14t4EQezYFPblJufZY2WquSrZhYbDRi9Y2EkoMo65zitlP8q n11ca5NIyOEeZ4PBM/2P9b0= X-Google-Smtp-Source: AA0mqf55H3rzHFJiNKZRaX7GR0RwZT2HrxvyHx5RLlp1V7lSyrkaqwzk09pjGCcQgnCO/gPk11Ag+w== X-Received: by 2002:a65:6d8b:0:b0:46b:158f:6265 with SMTP id bc11-20020a656d8b000000b0046b158f6265mr4415301pgb.193.1668234315516; Fri, 11 Nov 2022 22:25:15 -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 f15-20020a62380f000000b0056c360af4e3sm2584017pfa.9.2022.11.11.22.25.14 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Nov 2022 22:25:15 -0800 (PST) In-Reply-To: <8464849C-0F41-40DE-8B7D-08CF37320362@thornhill.no> X-Mailer: Apple Mail (2.3696.120.41.1.1) Received-SPF: pass client-ip=2607:f8b0:4864:20::430; envelope-from=casouri@gmail.com; helo=mail-pf1-x430.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:299612 Archived-At: >>=20 >> I noticed that with the default indent style, Emacs indents like = this: >>=20 >> int main () { >> for (int j =3D 0; j < 5; j++) >> a[j] =3D 3; >> int i =3D 1; >> swap(i, a[i+1]); >> Point p =3D {0, 1}; >> } >>=20 >> int main () >> { >> for (int j =3D 0; j < 5; j++) >> a[j] =3D 3; >> int i =3D 1; >> swap(i, a[i+1]); >> Point p =3D {0, 1}; >> } >>=20 >> Is this expected? >>=20 >> Yuan >=20 > The first one isn't gnu style, right? But it's an easy fix :) Thanks. It isn=E2=80=99t gnu style, but it would be nice if the first = snippet still indents normally. (So that I don=E2=80=99t need to set the = indent style for different projects.) Yuan