From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Would (Eval-when-compile (require 'treesit)) eliminate the need for (declare-function)s? Date: Mon, 17 Apr 2023 20:39:44 +0300 Message-ID: <83bkjm9zmn.fsf@gnu.org> References: <6E9242F5-EC30-4BA5-A290-0AA6CCB7ECE7@gmail.com> <83fs8ya17i.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7893"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, larsi@gnus.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Apr 17 19:40:14 2023 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 1poSpp-0001qA-AX for ged-emacs-devel@m.gmane-mx.org; Mon, 17 Apr 2023 19:40:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1poSpO-0000KU-Kb; Mon, 17 Apr 2023 13:39:46 -0400 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 1poSpI-0000KA-OV for emacs-devel@gnu.org; Mon, 17 Apr 2023 13:39:43 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1poSpI-0002p2-9D; Mon, 17 Apr 2023 13:39:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=L0XfFXLkdbwu89Ij0Nd2evnNvhVcYuHAoI4jPEbe8Xk=; b=L34vYzNEb38z HoCxhVFKHe5tyHO4dSig42AHbDijsIYmNCeyunCzCeNb1Zk3VnNKCzbRLJwj/aBH2RusARM9QBkZw RNehcnpWdoRJ0Rr367W3r2LC0rLucTVFg8zzGkSidjlEgpWNieY3JzgvpzAWIlAT2dy9xVLa08peo H4Y3HNqI9deXq+CDETSRe8tH2jTvUiEzNu8XUEIVIn6UgUTX8Nx6EJoNBMsd95yGdtHQ2KT0CUa4R VH0k+IDACcIKzgrgdfbGoSJaYvhSGghmlCYXuWHaUp4b8Iq5Xb1fsyuS3CXUQlGOeqW4CGY2t5dKR W/vEqB9chgKT32ubtMYnhA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1poSpH-0003Bj-L7; Mon, 17 Apr 2023 13:39:40 -0400 In-Reply-To: (message from Stefan Monnier on Mon, 17 Apr 2023 13:25:26 -0400) 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:305381 Archived-At: > From: Stefan Monnier > Cc: Yuan Fu , Lars Ingebrigtsen , > emacs-devel@gnu.org > Date: Mon, 17 Apr 2023 13:25:26 -0400 > > > Even if it does work reliably, I'm not sure we want that. It is > > better to have declare-function where the function is used, as that > > makes maintenance easier and less error-prone. > > But it makes sense for packages that do > > (require 'treesit) > > to be able to use those functions implemented in `treesit.c` without > bothering with `declare-function`. That's what I'm not sure about.