From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#68818: [PATCH] lisp/emacs-lisp/inline.el: Autoload public macros Date: Tue, 30 Jan 2024 13:11:06 -0500 Message-ID: References: <871q9zvtw0.fsf@localhost> <86cyti3ob3.fsf@gnu.org> <87sf2e23ie.fsf@localhost> Reply-To: Stefan Monnier Mime-Version: 1.0 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="30156"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 68818@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 30 19:12:11 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1rUsag-0007bs-Nv for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 30 Jan 2024 19:12:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rUsaS-0001Fl-7P; Tue, 30 Jan 2024 13:11:56 -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 1rUsaR-0001FU-8K for bug-gnu-emacs@gnu.org; Tue, 30 Jan 2024 13:11:55 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rUsaP-0007GI-6o for bug-gnu-emacs@gnu.org; Tue, 30 Jan 2024 13:11:54 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rUsaY-00010K-5m for bug-gnu-emacs@gnu.org; Tue, 30 Jan 2024 13:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 30 Jan 2024 18:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68818 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 68818-submit@debbugs.gnu.org id=B68818.17066382853816 (code B ref 68818); Tue, 30 Jan 2024 18:12:02 +0000 Original-Received: (at 68818) by debbugs.gnu.org; 30 Jan 2024 18:11:25 +0000 Original-Received: from localhost ([127.0.0.1]:36680 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUsZx-0000zU-G1 for submit@debbugs.gnu.org; Tue, 30 Jan 2024 13:11:25 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:48919) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rUsZv-0000zF-5F for 68818@debbugs.gnu.org; Tue, 30 Jan 2024 13:11:23 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 753501000DA; Tue, 30 Jan 2024 13:11:08 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1706638267; bh=DSWIRNDrSZ3Mire9V6HCfvK1hyKvE/rhzoBPwk1wPXc=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Nyt4lgruIVmn01XiCumC0yrs48u2UzxQL5ix28CCw86m1XMfEEasgNdFq9a4vqtVu EfuaxBOkFrsFCrcQuy8lJigvH49ee+ZlTNpDf9mdetRCjUs0mtbFNPKNN417lCAELn 4JRA7jMaf6cM3dHL9P5KmHJsEsh6QKywcO/FH8WiOvGPtXh2C+7whK6aF6bTYajiP4 bUjzqL5wwrhNLTnzmFB5wzsQnWlelI6I4d2dNYZzIB082zRYu704XDc70NnMOWFpPc 4u1ZvLPa7c78faq/+Ju4w5fmAxCwbPqB/OOzk2XsZrMJBVojpmzf8DdKo3bKgsXkOf gGvXFeFyVZU/w== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 4AA35100054; Tue, 30 Jan 2024 13:11:07 -0500 (EST) Original-Received: from alfajor (unknown [23.233.149.155]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1702C1202CB; Tue, 30 Jan 2024 13:11:07 -0500 (EST) In-Reply-To: <87sf2e23ie.fsf@localhost> (Ihor Radchenko's message of "Tue, 30 Jan 2024 16:24:25 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:279195 Archived-At: > Thanks! > `inline-const-val' docstring does not make it clear what happens when > the value is not known at compile time. Indeed, the docstring is lacking. =F0=9F=99=81 It "fails" which means that we revert to the "fallback" of not inlining. >>>> with emacs -Q, indenting the file will yield different results with and >>>> without executing (require 'inline). >>>> With the patch, indentation becomes consistent. >>> Hmm, I wonder whether there's a less heavy-handed approach to this. >> >> Agreed. Also, I think this problem is not specific to `define-inline`. >> Maybe the indentation code should try and (auto)load the macros >> it encounters. > > But how does it know that a given (expr ...) is a macro call or a > function call without loading the containing library? AFAIK, only > autoloading can provide such information. The autoload of `define-inline` says that it's a macro, so I was thinking that maybe when the indentation code see `define-inline` it could `autoload-do-load`. > Maybe, autoloading can automatically collect information about all the > symbols defined in each library - whether they are a > function/variable/macro and their declare statement? The point of an autoload object is that it's *much* cheaper than the real thing. So we can't add very much info to them. Stefan