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 integration on feature/tree-sitter Date: Fri, 17 Jun 2022 17:09:43 -0700 Message-ID: <83AB927D-2F48-44B7-840A-8992351680AF@gmail.com> References: <2c2746e5f2558a87e8eab6f0914264a020173a9d.camel@pm.me> <27630AA3-8026-4E24-8852-ACCD9325B99D@gmail.com> <0E9E702B-B07C-4794-8498-29B9320E14CC@gmail.com> <87o7ys2ibe.fsf@yahoo.com> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\)) 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="34028"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs Devel To: Po Lu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jun 18 02:11:01 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 1o2M3I-0008h0-GU for ged-emacs-devel@m.gmane-mx.org; Sat, 18 Jun 2022 02:11:00 +0200 Original-Received: from localhost ([::1]:41128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o2M3G-0008Vt-Ox for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Jun 2022 20:10:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36708) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o2M27-0007eL-Iz for emacs-devel@gnu.org; Fri, 17 Jun 2022 20:09:47 -0400 Original-Received: from mail-qk1-x72d.google.com ([2607:f8b0:4864:20::72d]:44923) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o2M26-0001kG-3D for emacs-devel@gnu.org; Fri, 17 Jun 2022 20:09:47 -0400 Original-Received: by mail-qk1-x72d.google.com with SMTP id c144so4233364qkg.11 for ; Fri, 17 Jun 2022 17:09:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ut+EBnH90YwySNd6jdlXGyByaGVqkQKdZmpHsSSocbo=; b=dlMKFnJcGsUORC0KEItrkj3KQuA+nPQllxa2Ov02rgHqS+zEyaAdUeOInIzNrmJMeq 6S/pjumo6D+DTyrRWzJQyRXbVsbyAJUvNFdUS67BYeIP8M6jFy5OppCwDhNhXHhqullw mUoxl0TEkShmeZonajnroULzd5cM5Fp9YZvnYrXyBPOMFSTW5J3gWq1KmCdpbwSrWOfH k7HskKlsKsAMvzV2pE/uvFVmEOGvC/QeDsGZqpLXtx/OAfJdfRK+UTnlyeQgUVTywYOV HRVoO1oXXXRt+0jkyaeftx+bvd0xmZ3Tl/wSTM60dIHx4kqCSp6D5w0mUC7Cn76GIFnD 8e3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=ut+EBnH90YwySNd6jdlXGyByaGVqkQKdZmpHsSSocbo=; b=Eixk86hvHJaVZ1X+zLye/g0iqnPM5HHN5BKbuA6VFBRsHyxFjf4ZNiu1bh6PepQXGz RA8mc8YPjr5WzJenGBWSHa46MoDiFR1lqQO0ymejQCRGGBr//emswUhlMGZuHmBa4mgd es50tPmqbJWnRbO7d1i1VwIFWRO6kIoKTaPg3JfDOUMAxLRbuEURak3uKIRVhczmCWYN +8mvBmZG9Iqw3tzKmoU7vyg8Ord5V/mfyuiRsXEP/6+8f+vXpu3j9/WWSmpFGyHTOYQB LcmfrBrZZHwy9iYv7q81bqtK791KxBmsOVfIa4yYWPuBpvU2gRKWLWibxHZ5IL0DLlt2 0E+g== X-Gm-Message-State: AJIora/5N633UtIZRzw9izvU5kWQKfYok8A5UVQJZBfgtAEGbW230jWH R/zIUYel2Lk51OunTxmSVKyNHgRJ6gA= X-Google-Smtp-Source: AGRyM1vo0ANdFU/ydpczbHNB2OtHI6vz8oyvXL8NxXQLtNK7UtNRwT3aPPKnDvVXoEoOZndLuOX+Bw== X-Received: by 2002:a37:9c50:0:b0:6a6:a208:d5d4 with SMTP id f77-20020a379c50000000b006a6a208d5d4mr8936089qke.467.1655510984800; Fri, 17 Jun 2022 17:09:44 -0700 (PDT) Original-Received: from smtpclient.apple ([2600:1700:2ec7:8c90:c15:33ec:172b:f758]) by smtp.gmail.com with ESMTPSA id 18-20020a370412000000b006a725432959sm5410591qke.37.2022.06.17.17.09.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jun 2022 17:09:44 -0700 (PDT) In-Reply-To: <87o7ys2ibe.fsf@yahoo.com> X-Mailer: Apple Mail (2.3696.100.31) Received-SPF: pass client-ip=2607:f8b0:4864:20::72d; envelope-from=casouri@gmail.com; helo=mail-qk1-x72d.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, T_SCC_BODY_TEXT_LINE=-0.01 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" Xref: news.gmane.io gmane.emacs.devel:291321 Archived-At: > On Jun 16, 2022, at 6:24 PM, Po Lu wrote: >=20 > Yuan Fu writes: >=20 >> Can I just add a new Lisp_Object field in struct buffer? I assume >> that=E2=80=99s how you add an internal buffer-local data? >=20 > Yes. Make sure the field is placed before > `cursor_in_non_selected_windows_', or it won't be traced by GC. >=20 > Also make sure to access it using the `BVAR' macro and add a > corresponding `DEFVAR_PER_BUFFER' form in syms_of_buffer if it's > supposed to be a buffer local variable. I don=E2=80=99t plan to expose it as a variable, so I don=E2=80=99t need = DEFVAR_PER_BUFFER, is that correct? Yuan=