From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: Average-user-facing interface for tree-sitter Date: Fri, 14 Oct 2022 04:22:15 -0700 Message-ID: <86y1titztk.fsf@stephe-leake.org> References: <3A7E7CD1-74A7-4352-9DFE-FC982EAA398E@gmail.com> <87ilko9r9e.fsf@gnus.org> <9794E2EF-4DB5-4A04-90F0-3EB51E6BE008@gmail.com> <87v8ombrd2.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13909"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (windows-nt) Cc: Yuan Fu , emacs-devel To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Oct 14 13:26:00 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 1ojIpD-0003LO-AM for ged-emacs-devel@m.gmane-mx.org; Fri, 14 Oct 2022 13:25:59 +0200 Original-Received: from localhost ([::1]:38648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojIpA-0005Kx-Kz for ged-emacs-devel@m.gmane-mx.org; Fri, 14 Oct 2022 07:25:56 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojIm1-0002hR-7z for emacs-devel@gnu.org; Fri, 14 Oct 2022 07:22:42 -0400 Original-Received: from alt-proxy28.mail.unifiedlayer.com ([74.220.216.123]:51986) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojIly-0000Kb-IE for emacs-devel@gnu.org; Fri, 14 Oct 2022 07:22:40 -0400 Original-Received: from cmgw14.mail.unifiedlayer.com (unknown [10.0.90.129]) by progateway1.mail.pro1.eigbox.com (Postfix) with ESMTP id AE5981003A129 for ; Fri, 14 Oct 2022 11:22:21 +0000 (UTC) Original-Received: from host2007.hostmonster.com ([67.20.76.71]) by cmsmtp with ESMTP id jIlfo4SUGCeXyjIlfoEdnB; Fri, 14 Oct 2022 11:22:21 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=Qv+bYX+d c=1 sm=1 tr=0 ts=6349466d a=dWLzHQi6WpdymmZIwiVdBw==:117 a=Fln8i1WyhtedwaIJAdHvmw==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=Qawa6l4ZSaYA:10:nop_rcvd_month_year a=vvvmwbhNdt4A:10:endurance_base64_authed_username_1 a=OocQHUDgAAAA:8 a=pGLkceISAAAA:8 a=SXZcR7xFmQ5Wi6odaDsA:9 a=YmVLrQmyUoEA:10:uccc_2email_address a=_efulHcpp3sA:10:hookup_email_user_1 a=xIHpHBSqFYYjWdlKNEB-:22 a=xUZTl98r3Qw_uB5NK3jt:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=stephe-leake.org; s=default; h=Content-Type:MIME-Version:Message-ID:Date: References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=PixQEQNT/JYhXumm8yeYm9aIFBT5os94k6+vsD33XA8=; b=hhrJY7YlZ4ThFQZxAWw2o3cm9w FRuJvQIhoyRzVvyv6QHmz8bwyn+2K83zP4WmEoTHLJgFLV1U3HlXpofBqSs+t5x4Kx2M7J3YsyUgn tU9jlrtqnSCakd7yPIp+GS04N3VXdv2UqxLcjTIyfGkXMunfDap0o+IJBAiGsh9JzqdhTcxMrYPdV k7k1GgJp3khDXJ+ORa+YtmB3KVIWPUL/ZWHDTbqqDeoPwdyy/zuCzUb1aQZEUnMSEGHFIX+u3fc0n hpguguq+k+YZR9SUC4jeK6EWbV/ZTYd8HWY04MkQ4rP1npRNBfH5FZ8b2T80h34C5Jm2GzJdJQkyh aIx0ZlAA==; Original-Received: from 135-180-197-170.fiber.dynamic.sonic.net ([135.180.197.170]:52071 helo=DESKTOP-G20DCG1) by host2007.hostmonster.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1ojIle-0021UW-RM; Fri, 14 Oct 2022 05:22:18 -0600 In-Reply-To: <87v8ombrd2.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 14 Oct 2022 13:02:17 +0200") X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host2007.hostmonster.com X-AntiAbuse: Original Domain - gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stephe-leake.org X-BWhitelist: no X-Source-IP: 135.180.197.170 X-Source-L: No X-Exim-ID: 1ojIle-0021UW-RM X-Source-Sender: 135-180-197-170.fiber.dynamic.sonic.net (DESKTOP-G20DCG1) [135.180.197.170]:52071 X-Source-Auth: stephen_leake@stephe-leake.org X-Email-Count: 3 X-Source-Cap: c3RlcGhlbGU7c3RlcGhlbGU7aG9zdDIwMDcuaG9zdG1vbnN0ZXIuY29t X-Local-Domain: yes Received-SPF: pass client-ip=74.220.216.123; envelope-from=stephen_leake@stephe-leake.org; helo=alt-proxy28.mail.unifiedlayer.com X-Spam_score_int: 16 X-Spam_score: 1.6 X-Spam_bar: + X-Spam_report: (1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:297718 Archived-At: Lars Ingebrigtsen writes: > Yuan Fu writes: > >> I wonder if we can have a major mode hook that runs before the body >> runs, like xxx-mode-before-hook. Then user can set >> feature-provider-alist in that hook. This way major modes can decide >> what backend (provider) to use for each features. +1 I needed something similar in ada-mode; I implemented it by moving have of the major mode function into a post-local-vars hook; that runs after the major mode function. -- -- Stephe