From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Use (eval-when-compile 'treesit) to save us from writing declare-function forms Date: Sun, 8 Dec 2024 18:01:39 +0200 Message-ID: <791c31a1-84ab-4cab-921b-cc8977e980d9@gutov.dev> References: <2C0B7D3A-6131-4427-BF04-9211981B57DD@gmail.com> <867c8g3o6v.fsf@gnu.org> <0D278D91-4D67-4E0E-869F-6AF0A46678F7@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37060"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: emacs-devel@gnu.org To: Yuan Fu , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 08 17:02:47 2024 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 1tKJk6-0009W7-6C for ged-emacs-devel@m.gmane-mx.org; Sun, 08 Dec 2024 17:02:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tKJjU-0006f5-K3; Sun, 08 Dec 2024 11:02:08 -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 1tKJjQ-0006eg-Qd for emacs-devel@gnu.org; Sun, 08 Dec 2024 11:02:04 -0500 Original-Received: from fout-a3-smtp.messagingengine.com ([103.168.172.146]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tKJjD-0006Fm-A2; Sun, 08 Dec 2024 11:02:04 -0500 Original-Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id 3D0F71383711; Sun, 8 Dec 2024 11:01:42 -0500 (EST) Original-Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Sun, 08 Dec 2024 11:01:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1733673702; x=1733760102; bh=OWRthqtSW54ZNGb6MHas4J65OAEoQwoat2EHT6duXLU=; b= fiFcrCKRxxSJTbpZGhWpHlKW/J4mSKM3+zO9cy6e+oeFK7fe9O4wyVAfD90YTe+z Ig25g8INtHuBocG1vbToX19e2/t9HFocwGXsujs87c2MPYyUiHEarVQebnRWtHGn LlLQpV0Dr06YRPeTjYOjCdVfuAcQ2UP83aBLlfhSQyS6C903z1zfK3ApPkufFOMF BYMocDb5NFIQ2IqUUf6iKrR+UkmIiD2ROyfxR+ah51RokXZpsh0gLVI8fVk0L1I/ gNJqB3ffyR/1zxxzykKIQPfMgVPuN6NQvK1rZsHjhOB1HdWygobFeYI2GmSRT4Su bordrNBugWbnF8xnJY2YUg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1733673702; x= 1733760102; bh=OWRthqtSW54ZNGb6MHas4J65OAEoQwoat2EHT6duXLU=; b=5 phOYYRPSJdxqoNHZxi/ktv2vKyo/UPUUFfHsLkmVolXugrL33R7At1xtoP/B/2xU X38eV5aIQ/rV+AxEpX0hLkioo9yV9Y2pDmK1vVg2RtpFl7bd71n45e2BG+yuqoFn WGDvlmw1f7QK0Pp4JtqlZ73CSmebae3SUiML8y6RpSKnspEqFuMCZMpI0uR7Oynd p37p1f7lXTgE1EllFUAs758fS/2QtixLbWKY2C1sUwnl8tRKRMvVDtLT0x6dZEsK bGpm7H8A0wMzVD0RSyVQJTNEccSdK79uT7/PrG7B1Y3U7Q5gGKGVxmz+bStpcTGg ovEQUK6OjUwsnQuEpgq5Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrjeefgdekgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeen ucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvg hvqeenucggtffrrghtthgvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedt vddtveefhfdvveegudejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthhtohep fedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheptggrshhouhhrihesghhmrghilh drtghomhdprhgtphhtthhopegvlhhiiiesghhnuhdrohhrghdprhgtphhtthhopegvmhgr tghsqdguvghvvghlsehgnhhurdhorhhg X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 8 Dec 2024 11:01:40 -0500 (EST) Content-Language: en-US In-Reply-To: <0D278D91-4D67-4E0E-869F-6AF0A46678F7@gmail.com> Received-SPF: pass client-ip=103.168.172.146; envelope-from=dmitry@gutov.dev; helo=fout-a3-smtp.messagingengine.com X-Spam_score_int: -26 X-Spam_score: -2.7 X-Spam_bar: -- X-Spam_report: (-2.7 / 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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_SBL_A=0.1 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:326195 Archived-At: On 04/12/2024 20:19, Yuan Fu wrote: > When Emacs is built without tree-sitter, none of the treesit.c functions are available (except for treesit-ready-p) Have we considered having all of those functions defined but doing nothing in that case? Alias them to 'ignore' or something that raises an error. I think then we won't have to maintain these 'declare-function' lists in every package that depends on treesit.c.