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: Thu, 12 Dec 2024 02:23:02 +0200 Message-ID: References: <2C0B7D3A-6131-4427-BF04-9211981B57DD@gmail.com> <867c8g3o6v.fsf@gnu.org> <0D278D91-4D67-4E0E-869F-6AF0A46678F7@gmail.com> <791c31a1-84ab-4cab-921b-cc8977e980d9@gutov.dev> 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="10812"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Yuan Fu , Eli Zaretskii , emacs-devel@gnu.org To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 12 01:24:08 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 1tLWzv-0002fc-Ji for ged-emacs-devel@m.gmane-mx.org; Thu, 12 Dec 2024 01:24:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLWzB-0001K5-Rr; Wed, 11 Dec 2024 19:23:21 -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 1tLWz3-0001Jf-Fx for emacs-devel@gnu.org; Wed, 11 Dec 2024 19:23:14 -0500 Original-Received: from fhigh-b2-smtp.messagingengine.com ([202.12.124.153]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tLWyz-00072W-K8; Wed, 11 Dec 2024 19:23:11 -0500 Original-Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.stl.internal (Postfix) with ESMTP id 08658254013D; Wed, 11 Dec 2024 19:23:06 -0500 (EST) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Wed, 11 Dec 2024 19:23:06 -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=1733962985; x=1734049385; bh=Gz5VxDHM1VfGBpURP+lpJqRezRCLfcfHM4abzQLCRjc=; b= K6iv7/7LSkTS2cyug4P07XkaoFJyMs4hf2noXBM2Ggt3h5n3Y95MOGCWieK1He3j uvzsI9BvEvW5/qd+dqvvCVQEDIr41WeTDFuZQxdZdNiqcU1n0Qjeh5tOmSIn65e4 UcNKbis+DzCLepCLJ8QPQPv3C3eZem0ZLvIYzVCV5/MTrPIrptjKV72JQcBhoz0A uW5PCMOmKaLnGGZXSDdbV1GqjwRnDfNafSOV7fVED9XFIg0vi5HnKIrO9Y4K/zpy j7DJX0ItfIXxlYCqbapvYKzbYqOA7M2KdaoanVqGLbqWHE9uiyPw9m8Y/NS+bfCH WUtiFQEPWtKQjPHzAy/RFw== 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=1733962985; x= 1734049385; bh=Gz5VxDHM1VfGBpURP+lpJqRezRCLfcfHM4abzQLCRjc=; b=g NxUFNZMaRR9LyOsQw5XGjnWMzFjZwF4GPmLuoIm+q4HDtr7IT3tM5Oz0KLqKYyW+ 0M258frB/Vn9z51wMCLTlZ6uQeoNsTy00KVrbJq6WNMP3PYdjoCEwWWjjUvMTp4t P8WyViuHyvNsNZuKLbn2Y6t2F54zS7eoXt/cUn07sNDl4rENUBDhxBEA6KH7mqZc VQ9OSmoLgAMO8BjJqxp/YNnB2RJrzSFC8slutt+rrfZxOvxyCgW+qTMShPDo1xsf J3Q/jbUHfkD0Oc7CxvPYfTRhKU0WaayLPBsdFONTrZJRA5nfWKmicKbPxzZJiE6g z34Pw6MQkeMo7lhECzjYw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrkedugddvudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeen ucfhrhhomhepffhmihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvg hvqeenucggtffrrghtthgvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedt vddtveefhfdvveegudejheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpegumhhithhrhiesghhuthhovhdruggvvhdpnhgspghrtghpthhtohep gedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprggtohhrrghllhhosehgnhhurd horhhgpdhrtghpthhtoheptggrshhouhhrihesghhmrghilhdrtghomhdprhgtphhtthho pegvlhhiiiesghhnuhdrohhrghdprhgtphhtthhopegvmhgrtghsqdguvghvvghlsehgnh hurdhorhhg X-ME-Proxy: Feedback-ID: i07de48aa:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 11 Dec 2024 19:23:04 -0500 (EST) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=202.12.124.153; envelope-from=dmitry@gutov.dev; helo=fhigh-b2-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_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_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:326390 Archived-At: On 12/12/2024 01:38, Andrea Corallo wrote: > The suggestion of having the C functions defined to nops when > HAVE_TREE_SITTER is not defined is cleaner in principle, but I think > there are two downsides: > > - We don't tipically do it this way, so it would be an exception We also don't typically require a caller to have a 'declare-function' for every function they use from a package that they (require ...) already. > - Also we should do it for all the functions in treesit.c, otherwise we > don't solve the original problem of introducing warnings by mistake on > non treesit builds. Sure. All non-static ones anyway.