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: How to add pseudo vector types Date: Fri, 16 Jul 2021 10:27:36 -0400 Message-ID: <46BBFF88-76C3-4818-8805-5437409BEA93@gmail.com> References: <83h7gw6pyj.fsf@gnu.org> <45EBF16A-C953-42C7-97D1-3A2BFEF7DD01@gmail.com> <83y2a764oy.fsf@gnu.org> <83v95b60fn.fsf@gnu.org> <00DD5BFE-D14E-449A-9319-E7B725DEBFB3@gmail.com> <83r1fz5xr9.fsf@gnu.org> <1AAB1BCC-362B-4249-B785-4E0530E15C60@gmail.com> <83czri67h0.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) 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="32593"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jul 16 16:28:14 2021 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 1m4Op4-0008Mv-1G for ged-emacs-devel@m.gmane-mx.org; Fri, 16 Jul 2021 16:28:14 +0200 Original-Received: from localhost ([::1]:40244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m4Op3-0007vO-00 for ged-emacs-devel@m.gmane-mx.org; Fri, 16 Jul 2021 10:28:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m4OoW-0007En-LW for emacs-devel@gnu.org; Fri, 16 Jul 2021 10:27:40 -0400 Original-Received: from mail-qt1-x830.google.com ([2607:f8b0:4864:20::830]:35652) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m4OoV-0004S0-9Z; Fri, 16 Jul 2021 10:27:40 -0400 Original-Received: by mail-qt1-x830.google.com with SMTP id g12so7230347qtb.2; Fri, 16 Jul 2021 07:27:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=k0hKwpq4v+h4WZUg6dqf93AhzQoZCxoNAtvEluyI5As=; b=qWYDX0QQR6EWoNV062cJvCe0CCWT/70gyJDV2ckb/PdueuSojRy6SwSoTsnPT//xIg I7YwH3inimWGBHuqnN53w8iFrWVKZFO/dbznXtcLpaW+U1OvjifLlTsVYEeKNq5SaV0k TYkDpL5Ifgvwrm9S1YnOHgwb+K4bOoh8AxiYVse/sULwamqpvYage5DTGpx24MZqPwL8 hDFM7o63YfwifC8W0kQh6t8Zoc6O6pKueIIob6lnvo08PloUEYr0sIxNqutFlwFbS31W g4YoxpZCRx4XxaHxnEp4su6WeiLqzrtFNNEBLisDILpxwAzHdqFIyEPQieP/Rjen++Kt 00+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=k0hKwpq4v+h4WZUg6dqf93AhzQoZCxoNAtvEluyI5As=; b=cVwOXb/jFjHN5BGiwcbgjq5Wnk1cRd7qAxYZV61DzllNlUKM52rQQKJk6V7sswIqbP 4L9wV/zKIZfuprcwNd0lzblTdaTEJINzFMM8GEEEM4650C/yxprnbzEQsh7zvoksACRU 1MuZx/5c90ORjgAzMda9UNy8epso0I0GGhwjQdtodPbDNeBE3X3i+cmYiQ+LFQ27Lurm IH8WrXiGiXChExwc3l3Q/T1schHWG9uX/WYbf431bsRE4tMxWspxh0kzaVBo6NCOlZur eWdvK/7syn/+ragAkEphPgS+33u6GjYEKsGEniSrsrtHqF2xwyC44GvdLxqLSgFcDYoK lNGA== X-Gm-Message-State: AOAM532pQLCZ4J/arOatX7lVVarlULJpuReYR/ZbSgmjExe5bHZOYHMn Rt5izXopSqUodUP1GbOSUFNXkeSz2SBk0Q== X-Google-Smtp-Source: ABdhPJyRA+82Gqk85Cq/XrgH+bBh+13Tywoy/NrRoZg+Of4W1OfEx5qVvIIgTnh2TC9q3GIOCz3fAg== X-Received: by 2002:ac8:1093:: with SMTP id a19mr9405766qtj.108.1626445657704; Fri, 16 Jul 2021 07:27:37 -0700 (PDT) Original-Received: from ?IPv6:2601:98a:4200:9210:b9:d7fc:e86c:5d26? ([2601:98a:4200:9210:b9:d7fc:e86c:5d26]) by smtp.gmail.com with ESMTPSA id a190sm4129289qkf.9.2021.07.16.07.27.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Jul 2021 07:27:37 -0700 (PDT) In-Reply-To: <83czri67h0.fsf@gnu.org> X-Mailer: Apple Mail (2.3654.60.0.2.21) Received-SPF: pass client-ip=2607:f8b0:4864:20::830; envelope-from=casouri@gmail.com; helo=mail-qt1-x830.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.23 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:271304 Archived-At: >=20 > Each command/feature that needs an updated TS tree will take care of > updating TS with the relevant information. We should record whatever > we need for that as side effect of primitives that change buffer text > (in insdel.c), and use the recorded info to update TS. But the actual > passing of text to TS should happen lazily, when we actually need its > re-parsing, not when the changes to buffer text are done. Ok, I will write it like that. Another question, how do I add a new = field in struct buffer? I tried to add Lisp_Object ts_parser_list_; Before=20 Lisp_Object cursor_in_non_selected_windows_; But that wouldn't dump. I want to put the parsers in a field rather than in a buffer local = variable because I don=E2=80=99t want users to add/remove parsers from = this list freely, otherwise the parsers could go out of sync. I plan to = provide functions like add-parser, remove-parser, buffer-parser-list for = users to access this list. Yuan=