GNU bug report logs - #68818
[PATCH] lisp/emacs-lisp/inline.el: Autoload public macros

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Ihor Radchenko <yantar92@HIDDEN>; Keywords: patch; dated Tue, 30 Jan 2024 13:20:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 68818 <at> debbugs.gnu.org:


Received: (at 68818) by debbugs.gnu.org; 10 Nov 2025 12:29:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 10 07:29:35 2025
Received: from localhost ([127.0.0.1]:37626 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vIR1b-0008Pc-1u
	for submit <at> debbugs.gnu.org; Mon, 10 Nov 2025 07:29:35 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:50825)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1vIR1Y-0008PS-JN
 for 68818 <at> debbugs.gnu.org; Mon, 10 Nov 2025 07:29:33 -0500
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id CB76D441631;
 Mon, 10 Nov 2025 07:29:26 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1762777765;
 bh=3Qvz/D8y0q61Gi+j1j9eo0p0xwh/23MxdoT3yldvFF0=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=H9pTmhmjMd7GHj1U7XdmA035MSadu/OrYNJdeR/XwaXJ06aPKUsncqLbJtmjN3dkT
 737EvcGJLfrYLz3zL0x6zb3+byKVCjdG3SJVB0Rn7fu0RUPqimofTODtMam4RwRSKL
 jetTVR4qPGQxnV8vs5YP7LoLnCQmF24aDFC7gFq4IYOzsDPOXRrORCVZTRvbB6wEk/
 RVHkVskrz4SBVqNvuPIDrZg/8KFFa7z4BF55/qyoQv/Y01Q9AklRUvO4dCHGp0Z/JR
 ldZmgzIVah1yN45obJ9YBeQo2raKgaHUe0JmcCmLR/Q0yFKOvgGdJjGK2ueySuTrzW
 Ez8kKxpdXBCZQ==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C5B36440310;
 Mon, 10 Nov 2025 07:29:25 -0500 (EST)
Received: from asado (unknown [179.49.125.171])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3A7011203B5;
 Mon, 10 Nov 2025 07:29:24 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Ihor Radchenko <yantar92@HIDDEN>
Subject: Re: bug#68818: [PATCH] lisp/emacs-lisp/inline.el: Autoload public
 macros
In-Reply-To: <87a50wh6mz.fsf@localhost>
Message-ID: <jwvh5v2f503.fsf-monnier+emacs@HIDDEN>
References: <871q9zvtw0.fsf@localhost> <86cyti3ob3.fsf@HIDDEN>
 <jwvsf2eaof4.fsf-monnier+emacs@HIDDEN> <87sf2e23ie.fsf@localhost>
 <jwvil3aofwj.fsf-monnier+emacs@HIDDEN> <87h6iuve2f.fsf@localhost>
 <CADwFkmnJZUy+DennJnAixmaK8W2cFOmjJLh4vAOkTGj2SNHL8A@HIDDEN>
 <87bjut6ldh.fsf@localhost> <87cybevaau.fsf@localhost>
 <jwv1pr8vp6y.fsf-monnier+emacs@HIDDEN> <87a50wh6mz.fsf@localhost>
Date: Mon, 10 Nov 2025 07:29:20 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 68818
Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Kangas <stefankangas@HIDDEN>,
 68818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> This will be something like the attached.
> However, I am not sure if manually resolving function indirection is the
> right approach. I copied it from `function-get', which almost does what
> we need as is with AUTOLOAD='macro

Oh, indeed we should use `function-get`.

> (but not really, as it does not trigger autoloading when symbol
> already has the requested property).

Sorry, I don't understand what you tried to say here.
Did you maybe write one "not" too many?

> Maybe resolving function indirection should be exposed as auxiliary
> function for all Elisp programs?

You mean like `indirect-function`?


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68818; Package emacs. Full text available.

Message received at 68818 <at> debbugs.gnu.org:


Received: (at 68818) by debbugs.gnu.org; 8 Nov 2025 15:44:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 08 10:44:06 2025
Received: from localhost ([127.0.0.1]:52121 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1vHl6j-0008NB-RV
	for submit <at> debbugs.gnu.org; Sat, 08 Nov 2025 10:44:06 -0500
Received: from mout02.posteo.de ([185.67.36.66]:52205)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>)
 id 1vHl6g-0008ML-H4
 for 68818 <at> debbugs.gnu.org; Sat, 08 Nov 2025 10:44:03 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id D6FCA240101
 for <68818 <at> debbugs.gnu.org>; Sat,  8 Nov 2025 16:43:55 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=posteo.net; s=2017;
 t=1762616635; bh=tOF5DX6CUwT9gCbKMeo9cFHeuxLTbSdaR/Amh9mmqrk=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=Sy+OeJdp3E7OnqtzmD9MonOzYBf2E0OolDq5Nb7/+/sOP5R4UmjZnLTn97lZIwnhA
 7upJU0HVlhQKtXAGKg6hhSeUWCOUTCQEn788R/Xf5pbTKoh+J9WPubklGXhTJ/xMOS
 yHJRbBZbNpeIK2QEqG7moxT4MXTeKyRX60wzwcT2UY5huPAHcW7LwElVcEBDjgUL4I
 4EFXLDOE7mXbCgqpPfFDvMedPyOL+t4kgscJzNcj9ILOsdcvP4mG8r/M1DO+Jp6f12
 N10Qwgr/ZtiJB/qozm8oVXC2UGmkvpImbcNFKCw18vNyQGc8+z70rqPaCYlaKKGp8v
 my+wuZ27svwLw==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4d3gFk6hPrz6v0F;
 Sat,  8 Nov 2025 16:43:54 +0100 (CET)
From: Ihor Radchenko <yantar92@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#68818: [PATCH] lisp/emacs-lisp/inline.el: Autoload public
 macros
In-Reply-To: <jwv1pr8vp6y.fsf-monnier+emacs@HIDDEN>
References: <871q9zvtw0.fsf@localhost> <86cyti3ob3.fsf@HIDDEN>
 <jwvsf2eaof4.fsf-monnier+emacs@HIDDEN> <87sf2e23ie.fsf@localhost>
 <jwvil3aofwj.fsf-monnier+emacs@HIDDEN> <87h6iuve2f.fsf@localhost>
 <CADwFkmnJZUy+DennJnAixmaK8W2cFOmjJLh4vAOkTGj2SNHL8A@HIDDEN>
 <87bjut6ldh.fsf@localhost> <87cybevaau.fsf@localhost>
 <jwv1pr8vp6y.fsf-monnier+emacs@HIDDEN>
Date: Sat, 08 Nov 2025 15:43:55 +0000
Message-ID: <87a50wh6mz.fsf@localhost>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 68818
Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Kangas <stefankangas@HIDDEN>,
 68818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain

Stefan Monnier <monnier@HIDDEN> writes:

>>> Should it be `lisp-indent-function'?
>
> I think that would be the place, yes.
> Maybe we could start with a simpler case: indentation inside
> `ert-deftest` is currently broken if `ert.el` is not yet loaded.
> Yet Emacs already knows that it's an (autoloaded) macro, so it clearly
> can DTRT here by (auto)loading the file when indenting something
> relative to it.

This will be something like the attached.
However, I am not sure if manually resolving function indirection is the
right approach. I copied it from `function-get', which almost does what
we need as is with AUTOLOAD='macro (but not really, as it does not
trigger autoloading when symbol already has the requested property).

Maybe resolving function indirection should be exposed as auxiliary
function for all Elisp programs?


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline; filename=tentative.diff

diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index e4dfc7c2f78..2b975b340b5 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -1253,6 +1253,17 @@ lisp-indent-function
       (let ((function (buffer-substring (point)
 					(progn (forward-sexp 1) (point))))
 	    method)
+        ;; When FUNCTION is autoloaded macro, trigger autoloading
+        ;; the whole containing library.  See bug#68818.
+        (let ((f (intern-soft function)))
+          (when (macrop f)
+            (while (and (symbolp f) (fboundp f))
+              (let ((fundef (symbol-function f)))
+                (if (and (autoloadp fundef)
+                         (not (equal fundef (autoload-do-load fundef f 'macro))))
+                    nil ; done
+                  ;; resolve alises further
+                  (setq f fundef))))))
 	(setq method (or (function-get (intern-soft function)
                                        'lisp-indent-function)
 			 (get (intern-soft function) 'lisp-indent-hook)))

--=-=-=
Content-Type: text/plain


-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68818; Package emacs. Full text available.

Message received at 68818 <at> debbugs.gnu.org:


Received: (at 68818) by debbugs.gnu.org; 24 Jun 2025 20:55:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 24 16:55:17 2025
Received: from localhost ([127.0.0.1]:50626 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uUAfl-0001MH-3c
	for submit <at> debbugs.gnu.org; Tue, 24 Jun 2025 16:55:17 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:13794)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1uUAfj-0001Ju-Cl
 for 68818 <at> debbugs.gnu.org; Tue, 24 Jun 2025 16:55:15 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 05E901000BC;
 Tue, 24 Jun 2025 16:55:10 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1750798509;
 bh=VybHs0AhHwKixfu9k56JcxxE5dI24ZGaj0OPLZS05g0=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=bEmLBnw+CFrRX8JMHfB4MiXqMZYIc3dbciIjHJLi156ActGgxTctAhAJF/RGrfTm8
 s2oYADrOZSu5AApN4Yg/YsRmO3vojQ4F7oIPOpDCNE5xS+Et1u89K6A1yM0mku3Z34
 N08SpIpA3SKNcc3nsSRp5/fas147046OY4FgTzg1G7NbGcTbegqHt9h2c6tMWc/nkK
 +DMHHs91dwVKsmJY+dA+tqQNoaPBd7wXrx7cpWQ7IDaNUEkn0kfae0C8OxQrdrcSpR
 iaYfXITwVfnplcraOksDUnxSStVbG3I6glUf1h/Op6KhW0QOKsp+9/WyRGiC0wWnew
 msHuFmZpd3S7w==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 0D01A100029;
 Tue, 24 Jun 2025 16:55:09 -0400 (EDT)
Received: from pastel (unknown [104.247.225.139])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D1F9B12008F;
 Tue, 24 Jun 2025 16:55:08 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Ihor Radchenko <yantar92@HIDDEN>
Subject: Re: bug#68818: [PATCH] lisp/emacs-lisp/inline.el: Autoload public
 macros
In-Reply-To: <87cybevaau.fsf@localhost>
Message-ID: <jwv1pr8vp6y.fsf-monnier+emacs@HIDDEN>
References: <871q9zvtw0.fsf@localhost> <86cyti3ob3.fsf@HIDDEN>
 <jwvsf2eaof4.fsf-monnier+emacs@HIDDEN> <87sf2e23ie.fsf@localhost>
 <jwvil3aofwj.fsf-monnier+emacs@HIDDEN> <87h6iuve2f.fsf@localhost>
 <CADwFkmnJZUy+DennJnAixmaK8W2cFOmjJLh4vAOkTGj2SNHL8A@HIDDEN>
 <87bjut6ldh.fsf@localhost> <87cybevaau.fsf@localhost>
Date: Tue, 24 Jun 2025 16:55:08 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.315 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 68818
Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Kangas <stefankangas@HIDDEN>,
 68818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>>> Did you make any progress here?  Does it still make sense to keep this
>>> bug report open?  Thanks in advance.
>> Did you expect me to update Elisp indentation code?
>> If yes, I am not really sure where I should do it.
>> Should it be `lisp-indent-function'?
> Ping!

I think that would be the place, yes.
Maybe we could start with a simpler case: indentation inside
`ert-deftest` is currently broken if `ert.el` is not yet loaded.
Yet Emacs already knows that it's an (autoloaded) macro, so it clearly
can DTRT here by (auto)loading the file when indenting something
relative to it.

For `inline-letevals` the situation is a bit more complicated because
the indentation code first needs to see that we're inside
a `define-inline`, but hopefully the above will be a good first step to
tackle the more complex case.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68818; Package emacs. Full text available.

Message received at 68818 <at> debbugs.gnu.org:


Received: (at 68818) by debbugs.gnu.org; 8 Jun 2025 09:44:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jun 08 05:44:15 2025
Received: from localhost ([127.0.0.1]:50738 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1uOCZa-0003uw-Vv
	for submit <at> debbugs.gnu.org; Sun, 08 Jun 2025 05:44:15 -0400
Received: from mout01.posteo.de ([185.67.36.65]:40989)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>)
 id 1uOCZY-0003ug-9S
 for 68818 <at> debbugs.gnu.org; Sun, 08 Jun 2025 05:44:13 -0400
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 4921B240028
 for <68818 <at> debbugs.gnu.org>; Sun,  8 Jun 2025 11:44:06 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net;
 s=1984.ea087b; t=1749375846;
 bh=srQEZYneDc4O/EpfbbcdxvNf/qy+yZqVNS4TtRWVQJw=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=EhZvmiqCWETzQttzjICFeRqN6RZutF2ppX26a+y4uetjbrLn4TiL/jLHQesCPGKAE
 RMQqoDV/DaSgw0GiiOYxXyAYw0s0ZDwpUZAduEUNcSygC2cgeX4eezfb3iLgULhwb/
 pI/NbC6dhg6wRsB8YzLaODjbE7b/dMrr1QrUGXaVZ8rdoL5z+TiYO24kdEDY/jHGtZ
 NuqOr2VRXnYVvicShCZ1m4Ajp1e/hd0vEx53A9GQsmPfALL24s9SGQjHjo7Hfx6pk2
 R8uGSBXmFyUCRfwSu1Sfm4z7FZv9pLpreGv1XO6WOju7uzzQnBEk0QXXuZwblUUJDB
 Zl4rhboe1bIqUcmQ8RgTRYPybke/kLkIf38cA0tLUCdqb8/RQ95KODTJi2E9RNHzN0
 QloH1Z8i4gSudMODV0KjtJWYiANx6NOYuBcPzH1DWnLlAEHnucYZqRrWYq2/PaWpS3
 qCFPCUldRvkdkO92T86bhwcKdI8yBLnYeD0ZeZQawOyl2GTq2w8
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4bFVW92jFZz9rxF;
 Sun,  8 Jun 2025 11:44:05 +0200 (CEST)
From: Ihor Radchenko <yantar92@HIDDEN>
To: Stefan Kangas <stefankangas@HIDDEN>
Subject: Re: bug#68818: [PATCH] lisp/emacs-lisp/inline.el: Autoload public
 macros
In-Reply-To: <87bjut6ldh.fsf@localhost>
References: <871q9zvtw0.fsf@localhost> <86cyti3ob3.fsf@HIDDEN>
 <jwvsf2eaof4.fsf-monnier+emacs@HIDDEN> <87sf2e23ie.fsf@localhost>
 <jwvil3aofwj.fsf-monnier+emacs@HIDDEN> <87h6iuve2f.fsf@localhost>
 <CADwFkmnJZUy+DennJnAixmaK8W2cFOmjJLh4vAOkTGj2SNHL8A@HIDDEN>
 <87bjut6ldh.fsf@localhost>
Date: Sun, 08 Jun 2025 09:42:49 +0000
Message-ID: <87cybevaau.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 68818
Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>,
 68818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Ihor Radchenko <yantar92@HIDDEN> writes:
>> Did you make any progress here?  Does it still make sense to keep this
>> bug report open?  Thanks in advance.
>
> Did you expect me to update Elisp indentation code?
> If yes, I am not really sure where I should do it.
> Should it be `lisp-indent-function'?

Ping!

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68818; Package emacs. Full text available.

Message received at 68818 <at> debbugs.gnu.org:


Received: (at 68818) by debbugs.gnu.org; 23 Feb 2025 09:50:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 23 04:50:43 2025
Received: from localhost ([127.0.0.1]:59349 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tm8dG-00015z-TM
	for submit <at> debbugs.gnu.org; Sun, 23 Feb 2025 04:50:43 -0500
Received: from mout02.posteo.de ([185.67.36.66]:57101)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <yantar92@HIDDEN>)
 id 1tm8dD-00015c-38
 for 68818 <at> debbugs.gnu.org; Sun, 23 Feb 2025 04:50:40 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id 7FA67240101
 for <68818 <at> debbugs.gnu.org>; Sun, 23 Feb 2025 10:50:31 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1740304231; bh=jx8nhwTdYhkyu97s/fXpFGgd1nwxRjODJpZCgKAvBDk=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=KOh9TURE2cZTnT4arO2C1RcJXEp775LZz2OZHGfQI8x8wt9wY/yqjDxpdGEYgL9Ab
 8dx/CcMQ7RC7rYWYK02aayPDifpNbJZL+pi1LKnHmPm+o6WdBAEhg418ZNX6nkPfl9
 ZAVaym+zm8fxHxMt+J+Xm6Tczm8fj37pFje5dxXkIigxSLVu3yqtWjQCCwaH1JxVVM
 YUmz3Js04EC4YHceDF0sU8drm0JAfSNEEXHmkP7x6MeYbrNI/DBDDGNKn0HISck2o7
 iK7ddSJuxhyUK+KUy8r2Obw0jvnNpOw4CTy1eKaDHEY1cImQS17GUQDQPaXiwtTsHD
 YijzshZZUThjQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Z0zd24XhXz6trs;
 Sun, 23 Feb 2025 10:50:30 +0100 (CET)
From: Ihor Radchenko <yantar92@HIDDEN>
To: Stefan Kangas <stefankangas@HIDDEN>
Subject: Re: bug#68818: [PATCH] lisp/emacs-lisp/inline.el: Autoload public
 macros
In-Reply-To: <CADwFkmnJZUy+DennJnAixmaK8W2cFOmjJLh4vAOkTGj2SNHL8A@HIDDEN>
References: <871q9zvtw0.fsf@localhost> <86cyti3ob3.fsf@HIDDEN>
 <jwvsf2eaof4.fsf-monnier+emacs@HIDDEN> <87sf2e23ie.fsf@localhost>
 <jwvil3aofwj.fsf-monnier+emacs@HIDDEN> <87h6iuve2f.fsf@localhost>
 <CADwFkmnJZUy+DennJnAixmaK8W2cFOmjJLh4vAOkTGj2SNHL8A@HIDDEN>
Date: Sun, 23 Feb 2025 09:50:02 +0000
Message-ID: <87bjut6ldh.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 68818
Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>,
 68818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Stefan Kangas <stefankangas@HIDDEN> writes:

>>> 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`.
>>
>> That would make sense, yes.
>
> Did you make any progress here?  Does it still make sense to keep this
> bug report open?  Thanks in advance.

Did you expect me to update Elisp indentation code?
If yes, I am not really sure where I should do it.
Should it be `lisp-indent-function'?

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68818; Package emacs. Full text available.

Message received at 68818 <at> debbugs.gnu.org:


Received: (at 68818) by debbugs.gnu.org; 23 Feb 2025 01:00:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Feb 22 20:00:34 2025
Received: from localhost ([127.0.0.1]:58101 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tm0MD-0002JE-Sv
	for submit <at> debbugs.gnu.org; Sat, 22 Feb 2025 20:00:34 -0500
Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]:46558)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <stefankangas@HIDDEN>)
 id 1tm0M9-0001wT-Kt
 for 68818 <at> debbugs.gnu.org; Sat, 22 Feb 2025 20:00:31 -0500
Received: by mail-ed1-x52f.google.com with SMTP id
 4fb4d7f45d1cf-5e08064b4ddso4463914a12.1
 for <68818 <at> debbugs.gnu.org>; Sat, 22 Feb 2025 17:00:29 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1740272423; x=1740877223; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=aR2IggjuPpqm8lzuJFwT/eb3Evv0RWB4HsBZErNfmpc=;
 b=jxLGUWi6LJMdhXCuO08VOEmBi+H/72wTy7vWvAHRp1CfIsqxikO/2hlIoTHRYMWWcH
 Vjhprmwty8V30l42qD5pvalhf98NABwFo6YvwN6NIPBw5IGkajaJhDejXJ8rKWYdi7oz
 KRtZeeDuZmYkJcdiiitxTygxroRJjmZIX4P+piFIYbGQxtEC+B4CwzC+yGwoHE+6hz/o
 u7ZTvI6XXl27TzAospdGrekAU0Y/k5DOAY5PpnK7VA5D+HhpMZLrQMm9L8t9rPW/c6gq
 kVeG1++sDFBr4g6KPqPBhB9+zDRVpAq8rVL7YNVomDzqiyarxQkMhx8ZbsJsQYWG2g/D
 R5Ew==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1740272423; x=1740877223;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=aR2IggjuPpqm8lzuJFwT/eb3Evv0RWB4HsBZErNfmpc=;
 b=TWycl+TVxVnDA4xnU5Kpt+hVij+STOjQ7rRrUWukyj9B+DEjaC1UFih4f/cM/NNIzC
 kvm8KSK3ABTVgR0jURfSWNBWsuZuGe7/tCXj8E0Bo3RvN7prXk38ogevfMB5sxIG1j6h
 YrYQrIP/kR4FM3IkAoz/k8hlV7WmoDTdrkb2QH6x8FARjp/VnAKcSVfcN5xjjB41VFUy
 jRDu+XsZUFOZTtGDzw3eSwzrnQfa0QFI3By7vOj+sFtGNEYw/TK4wZFaH64Y9AokowAQ
 WAJZ+isqej2fxuUioViPFKTjaan6B0PopGowAq3xbO3V3i7BoQkvW0QtTK7fFLuNAJE5
 ifBQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCX9C63RmDeisKcHlVgdS7vLiFQEjq/UvnGdHyp6RltvA9QLQHalpw/8fqRwNaXHl4+lW242Cw==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Yzggnupe09z4hPglwVzJ7OEwSIDAxBCOVinFDCm+RQQaUanKUTR
 ed7qUwiwzDm4md2P/57IotFDkmt/qlNPUZOajb3odH74Z5M1PRgW2CNwpHq8wDIs3a8OhpBuezE
 UKpfOIHXrxeKgyjYun1LLmF46mVM=
X-Gm-Gg: ASbGncu+2XtLYkR/1Dy8kiFVbWFBo8o6Y0tfnehVnBJG1dMU6h5eiwb73g0sqbv2y4e
 Jo8RDXp3wPV6KguZ+JwiGFLWqmyw/yxW0Qaxf3phbs/vNoyVpgS8i4GheJD+7LRwmJNYaFFkBGK
 u7lKoLt5Be
X-Google-Smtp-Source: AGHT+IER0/PWAPkBxviw3wkGFkzwOn1yXt3y0TMUjfscT4Lrki6syZRJwkovakgHvbyXtWN5uT+jrPltpLxGortbNa8=
X-Received: by 2002:a05:6402:530b:b0:5de:ce71:bacb with SMTP id
 4fb4d7f45d1cf-5e0b70f334emr6894426a12.16.1740272423264; Sat, 22 Feb 2025
 17:00:23 -0800 (PST)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Sun, 23 Feb 2025 01:00:22 +0000
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <87h6iuve2f.fsf@localhost>
References: <871q9zvtw0.fsf@localhost> <86cyti3ob3.fsf@HIDDEN>
 <jwvsf2eaof4.fsf-monnier+emacs@HIDDEN> <87sf2e23ie.fsf@localhost>
 <jwvil3aofwj.fsf-monnier+emacs@HIDDEN> <87h6iuve2f.fsf@localhost>
MIME-Version: 1.0
Date: Sun, 23 Feb 2025 01:00:22 +0000
X-Gm-Features: AWEUYZlsltJcIAx5TnYPUOUV5fXSLu4X5d6FZwpqR1t36z8TmVFjeaJaCsrqi6c
Message-ID: <CADwFkmnJZUy+DennJnAixmaK8W2cFOmjJLh4vAOkTGj2SNHL8A@HIDDEN>
Subject: Re: bug#68818: [PATCH] lisp/emacs-lisp/inline.el: Autoload public
 macros
To: Ihor Radchenko <yantar92@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 68818
Cc: Eli Zaretskii <eliz@HIDDEN>, Stefan Monnier <monnier@HIDDEN>,
 68818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Ihor Radchenko <yantar92@HIDDEN> writes:

> Stefan Monnier <monnier@HIDDEN> writes:
>
>>> 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`.
>
> That would make sense, yes.

Did you make any progress here?  Does it still make sense to keep this
bug report open?  Thanks in advance.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68818; Package emacs. Full text available.

Message received at 68818 <at> debbugs.gnu.org:


Received: (at 68818) by debbugs.gnu.org; 30 Jan 2024 19:00:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 30 14:00:23 2024
Received: from localhost ([127.0.0.1]:36767 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rUtLK-0002Ki-Te
	for submit <at> debbugs.gnu.org; Tue, 30 Jan 2024 14:00:23 -0500
Received: from mout01.posteo.de ([185.67.36.65]:51453)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yantar92@HIDDEN>) id 1rUtLJ-0002KP-Gi
 for 68818 <at> debbugs.gnu.org; Tue, 30 Jan 2024 14:00:22 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 64A4124002A
 for <68818 <at> debbugs.gnu.org>; Tue, 30 Jan 2024 20:00:06 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1706641206; bh=jNF/PCeI/NyFkVLfb7LzyueQGuVGnx9DY3/YC1G8VB8=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=HIRFlIk6NXszMkPwsD4sjunT5FHMPg3QwyZrIuoHLE6iECRcdHYQcXKuVibVZf4Ev
 I6DfJYfOcl8MUL1yiQzDjNJGuwqqwo65gZyuBx59XLpydQ+eNG7Nxn4w4YmzhKzoOF
 i9QpH4HlNCBOp9tRpxAgwpxSgaoSIFIg7FQbtmLGdDJn/oKytyMsDrnSDoBXdGJC+o
 WxB7p/6uq33cPQAnW5oAf675/zIS2K8vXmVHUWj0AX8TDiAb49oQLnoC5kZXpXuQSX
 ytFIm4pv3NuhS48WVGiHgWcdQRLOb0YOMdzk14V4LWkNLpsPc1lVc9vI+4xr51bEUB
 BD7G2671GabRg==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4TPZH91nJYz9rxD;
 Tue, 30 Jan 2024 20:00:04 +0100 (CET)
From: Ihor Radchenko <yantar92@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#68818: [PATCH] lisp/emacs-lisp/inline.el: Autoload public
 macros
In-Reply-To: <jwvil3aofwj.fsf-monnier+emacs@HIDDEN>
References: <871q9zvtw0.fsf@localhost> <86cyti3ob3.fsf@HIDDEN>
 <jwvsf2eaof4.fsf-monnier+emacs@HIDDEN> <87sf2e23ie.fsf@localhost>
 <jwvil3aofwj.fsf-monnier+emacs@HIDDEN>
Date: Tue, 30 Jan 2024 19:03:36 +0000
Message-ID: <87h6iuve2f.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 68818
Cc: Eli Zaretskii <eliz@HIDDEN>, 68818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Stefan Monnier <monnier@HIDDEN> writes:

>> 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`.

That would make sense, yes.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68818; Package emacs. Full text available.

Message received at 68818 <at> debbugs.gnu.org:


Received: (at 68818) by debbugs.gnu.org; 30 Jan 2024 18:11:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 30 13:11:25 2024
Received: from localhost ([127.0.0.1]:36680 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rUsZx-0000zU-G1
	for submit <at> debbugs.gnu.org; Tue, 30 Jan 2024 13:11:25 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:48919)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1rUsZv-0000zF-5F
 for 68818 <at> debbugs.gnu.org; Tue, 30 Jan 2024 13:11:23 -0500
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==
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)
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)
From: Stefan Monnier <monnier@HIDDEN>
To: Ihor Radchenko <yantar92@HIDDEN>
Subject: Re: bug#68818: [PATCH] lisp/emacs-lisp/inline.el: Autoload public
 macros
In-Reply-To: <87sf2e23ie.fsf@localhost> (Ihor Radchenko's message of "Tue, 30
 Jan 2024 16:24:25 +0000")
Message-ID: <jwvil3aofwj.fsf-monnier+emacs@HIDDEN>
References: <871q9zvtw0.fsf@localhost> <86cyti3ob3.fsf@HIDDEN>
 <jwvsf2eaof4.fsf-monnier+emacs@HIDDEN> <87sf2e23ie.fsf@localhost>
Date: Tue, 30 Jan 2024 13:11:06 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.142 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain T_SCC_BODY_TEXT_LINE    -0.01 -
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 68818
Cc: Eli Zaretskii <eliz@HIDDEN>, 68818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> 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





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68818; Package emacs. Full text available.

Message received at 68818 <at> debbugs.gnu.org:


Received: (at 68818) by debbugs.gnu.org; 30 Jan 2024 16:21:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 30 11:21:14 2024
Received: from localhost ([127.0.0.1]:36553 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rUqrJ-0000zA-Ih
	for submit <at> debbugs.gnu.org; Tue, 30 Jan 2024 11:21:13 -0500
Received: from mout02.posteo.de ([185.67.36.66]:34089)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yantar92@HIDDEN>) id 1rUqrH-0000yZ-1m
 for 68818 <at> debbugs.gnu.org; Tue, 30 Jan 2024 11:21:12 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id CF9A7240103
 for <68818 <at> debbugs.gnu.org>; Tue, 30 Jan 2024 17:20:55 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1706631655; bh=PnDrdDkDPoF9w2pOqSnsGFl8d/NNPPQFVhS9dyXW61U=;
 h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
 From;
 b=CInG9UqKdEaE7ylfHZR8Z+9weAGHodsDcpvjHKvOOBWQdU7dyFPGbcQGZLwKVzuac
 vzbL3a5ZyqeqPi5/8PF1au1hLeQpJmW/340ZhpHnrupFsSx+1kNyZefwOj9TlZPB5K
 L1u6gd0AYRgn+QGCZO9Slr3R7PV2mKrIIZlKJx5szBr+qAFDfVxh3LwimCW1tnNS4k
 jEVK/v3HvbPCBCLGEgByggxxvBwipKO16YdzFNHXvtC8YN6329dgleYQtUE8uWmyzi
 Ms75HCkdbUcVpD/RXwzJWe1ipf8W44JAD+eIyI09Q9t0Dn4QCCiqy1n0/hesjhb9p+
 +wSzMadCjaQKw==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4TPVlV2ZPNz9rxR;
 Tue, 30 Jan 2024 17:20:53 +0100 (CET)
From: Ihor Radchenko <yantar92@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#68818: [PATCH] lisp/emacs-lisp/inline.el: Autoload public
 macros
In-Reply-To: <jwvsf2eaof4.fsf-monnier+emacs@HIDDEN>
References: <871q9zvtw0.fsf@localhost> <86cyti3ob3.fsf@HIDDEN>
 <jwvsf2eaof4.fsf-monnier+emacs@HIDDEN>
Date: Tue, 30 Jan 2024 16:24:25 +0000
Message-ID: <87sf2e23ie.fsf@localhost>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 68818
Cc: Eli Zaretskii <eliz@HIDDEN>, 68818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Stefan Monnier <monnier@HIDDEN> writes:

> [ Side note: IIRC the above can be simplified as:
>
>     (define-inline org-element-type-p (node types)
>       "Return non-nil when NODE type is one of TYPES.
>     TYPES can be a type symbol or a list of symbols."
>       (inline-letevals (node types)
>         (if (listp (inline-const-val types))
>             (inline-quote (memq (org-element-type ,node t) ,types))
>           (inline-quote (eq (org-element-type ,node t) ,types)))))

Thanks!
`inline-const-val' docstring does not make it clear what happens when
the value is not known at compile time.

>>> 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.

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?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68818; Package emacs. Full text available.

Message received at 68818 <at> debbugs.gnu.org:


Received: (at 68818) by debbugs.gnu.org; 30 Jan 2024 14:30:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 30 09:30:56 2024
Received: from localhost ([127.0.0.1]:34720 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rUp8Z-0005lg-GP
	for submit <at> debbugs.gnu.org; Tue, 30 Jan 2024 09:30:55 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:45038)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1rUp8X-0005lR-VM
 for 68818 <at> debbugs.gnu.org; Tue, 30 Jan 2024 09:30:54 -0500
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 8CA3A4412EA;
 Tue, 30 Jan 2024 09:30:38 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1706625037;
 bh=Y/KuTSZsMxYIvydyxDjgts1dWapbFxVztGA2gHQ/O1E=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=W35JKyw4mBAxgTCCdfo12xoP26+6s27g0FnH/xc42oBHjh2AgyBKSII8IZ39TCLeO
 xmGBTSKKVC8Gkt9ToEEFfQ69cJ0nJiw2hny4ab0kJ62238iKrqyqSLjWqIzKDZW45N
 rluCBWfPhiQAaq2leKBo9k8CrUig2GGlwvSczMNKh6b92hWexw+nhWDUqW3FvjcF7+
 g5GNoE7Dj08CGoKKKWSU7TMCHa+prR9sUDDo7g5DPWdZ10lBSW0iEJoQ9i643gefPf
 KPw0BluvX3B/Q3fcgFfmyhQ6l/o0EDoral6O0dd2/VEnhVqTpRZxytVRmjQCLbb4AM
 NPu6TOrBF78/w==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 228054412DF;
 Tue, 30 Jan 2024 09:30:37 -0500 (EST)
Received: from pastel (104-222-119-131.cpe.teksavvy.com [104.222.119.131])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E6E291204F5;
 Tue, 30 Jan 2024 09:30:36 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#68818: [PATCH] lisp/emacs-lisp/inline.el: Autoload public
 macros
In-Reply-To: <86cyti3ob3.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 30 Jan
 2024 16:09:52 +0200")
Message-ID: <jwvsf2eaof4.fsf-monnier+emacs@HIDDEN>
References: <871q9zvtw0.fsf@localhost> <86cyti3ob3.fsf@HIDDEN>
Date: Tue, 30 Jan 2024 09:30:36 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.221 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain T_SCC_BODY_TEXT_LINE    -0.01 -
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 68818
Cc: Ihor Radchenko <yantar92@HIDDEN>, 68818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> This patch solves annoying problem with `define-inline' forms not being
>> indented correctly unless inline.el is explicitly loaded.
>> 
>> For illustration, try to open the following foo.el file:
>> 
>> (define-inline org-element-type-p (node types)
>>   "Return non-nil when NODE type is one of TYPES.
>> TYPES can be a type symbol or a list of symbols."
>>   (if (inline-const-p types)
>>       (if (listp (inline-const-val types))
>>           (inline-quote (memq (org-element-type ,node t) ,types))
>>         (inline-quote (eq (org-element-type ,node t) ,types)))
>>     (inline-letevals (node types)
>>       (inline-quote
>>        (if (listp ,types)
>>            (memq (org-element-type ,node t) ,types)
>>          (eq (org-element-type ,node t) ,types))))))

[ Side note: IIRC the above can be simplified as:

    (define-inline org-element-type-p (node types)
      "Return non-nil when NODE type is one of TYPES.
    TYPES can be a type symbol or a list of symbols."
      (inline-letevals (node types)
        (if (listp (inline-const-val types))
            (inline-quote (memq (org-element-type ,node t) ,types))
          (inline-quote (eq (org-element-type ,node t) ,types)))))

]

>> 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.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68818; Package emacs. Full text available.

Message received at 68818 <at> debbugs.gnu.org:


Received: (at 68818) by debbugs.gnu.org; 30 Jan 2024 14:10:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 30 09:10:21 2024
Received: from localhost ([127.0.0.1]:34675 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rUoof-00059i-Go
	for submit <at> debbugs.gnu.org; Tue, 30 Jan 2024 09:10:21 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10]:54156)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1rUood-00059O-At
 for 68818 <at> debbugs.gnu.org; Tue, 30 Jan 2024 09:10:20 -0500
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 <eliz@HIDDEN>)
 id 1rUooL-0005l9-0c; Tue, 30 Jan 2024 09:10:02 -0500
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=vgGMClEh0aaQpO43caDGeJ2zSKCgUJi3WNbQzZM4C68=; b=VXW1BWftNPwf
 2cVddlZ/B9XJsWqSkftWPONSNyn55IwyV1ISVaT2iH03juZLxuDZ7x7nUYJXDHFW3FOYTtKiAaOjX
 8rkkTq8zhmZdun+Vp2FLWyh/O1QgscusNMYMIBRVezUVzBpfg7oCL2At2zELW71vXAtD1xj6VxiqQ
 KL4H+n1ykTv+WpYI5T2NGkw6GEOJF7s6r3dExqcKrzULZCBky+VYj+5/vpsghv0j0tt1pWvpGDwwa
 vcKfz805KqybuJnjvp0bj5w9YBPArtn/kQoJJ5dQljllZ/99CXuaN+HFCs3DuUMJt3LYXaHjigrGr
 pK6mwOw7qKZxKph/gALitg==;
Date: Tue, 30 Jan 2024 16:09:52 +0200
Message-Id: <86cyti3ob3.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ihor Radchenko <yantar92@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <871q9zvtw0.fsf@localhost> (message from Ihor Radchenko on Tue,
 30 Jan 2024 13:21:51 +0000)
Subject: Re: bug#68818: [PATCH] lisp/emacs-lisp/inline.el: Autoload public
 macros
References: <871q9zvtw0.fsf@localhost>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 68818
Cc: 68818 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Ihor Radchenko <yantar92@HIDDEN>
> Date: Tue, 30 Jan 2024 13:21:51 +0000
> 
> This patch solves annoying problem with `define-inline' forms not being
> indented correctly unless inline.el is explicitly loaded.
> 
> For illustration, try to open the following foo.el file:
> 
> (define-inline org-element-type-p (node types)
>   "Return non-nil when NODE type is one of TYPES.
> TYPES can be a type symbol or a list of symbols."
>   (if (inline-const-p types)
>       (if (listp (inline-const-val types))
>           (inline-quote (memq (org-element-type ,node t) ,types))
>         (inline-quote (eq (org-element-type ,node t) ,types)))
>     (inline-letevals (node types)
>       (inline-quote
>        (if (listp ,types)
>            (memq (org-element-type ,node t) ,types)
>          (eq (org-element-type ,node t) ,types))))))
> 
> 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.

Stefan, any suggestions?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#68818; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 30 Jan 2024 13:19:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jan 30 08:19:08 2024
Received: from localhost ([127.0.0.1]:34582 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rUo15-0003Xp-VX
	for submit <at> debbugs.gnu.org; Tue, 30 Jan 2024 08:19:08 -0500
Received: from lists.gnu.org ([2001:470:142::17]:39860)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <yantar92@HIDDEN>) id 1rUo14-0003X6-5S
 for submit <at> debbugs.gnu.org; Tue, 30 Jan 2024 08:19:06 -0500
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 <yantar92@HIDDEN>)
 id 1rUo0d-0003HK-4b
 for bug-gnu-emacs@HIDDEN; Tue, 30 Jan 2024 08:18:47 -0500
Received: from mout01.posteo.de ([185.67.36.65])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <yantar92@HIDDEN>)
 id 1rUo0P-0002ut-Gl
 for bug-gnu-emacs@HIDDEN; Tue, 30 Jan 2024 08:18:28 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 779E9240028
 for <bug-gnu-emacs@HIDDEN>; Tue, 30 Jan 2024 14:18:21 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1706620701; bh=CnoRpNX/v5VbNzf22VryaLpAzwBkT+JiTTaQeE4bUwU=;
 h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From;
 b=IaWB2PwpZc9xOjj048gfPSSc+vudc2HRLj/t/1Wi7ov/Q5PiQkE+8I+SDMQEZusIq
 ye8IuO2j5tpT4w34ypPbZPFKVMBisIcKRh4nh4+vYe9LOMVQUk0PFGzzIStWn9xJa+
 m5/8DcV7ae+ORtY/byIGmB29mc1E6u/TM8O4ZMLZF22BXLaa1dnq5UkuZlxG242ruD
 tyRuGvaHfvW1GLnT5/zx9gtiuylMwKnWP+Ha/TjnnRGY7NZhddecLcm/Xl2PoyYQkx
 oytw/osL56Gub/nFW31os01LmuQP06HWDTMdo6RbhydwWi0Y3aWtS8p8w0lfBiLuz5
 umA69lNheSIjQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4TPQhr4m7hz6tsb
 for <bug-gnu-emacs@HIDDEN>; Tue, 30 Jan 2024 14:18:20 +0100 (CET)
From: Ihor Radchenko <yantar92@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] lisp/emacs-lisp/inline.el: Autoload public macros
Date: Tue, 30 Jan 2024 13:21:51 +0000
Message-ID: <871q9zvtw0.fsf@localhost>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@HIDDEN;
 helo=mout01.posteo.de
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

--=-=-=
Content-Type: text/plain

Tags: patch

Hello,

This patch solves annoying problem with `define-inline' forms not being
indented correctly unless inline.el is explicitly loaded.

For illustration, try to open the following foo.el file:

(define-inline org-element-type-p (node types)
  "Return non-nil when NODE type is one of TYPES.
TYPES can be a type symbol or a list of symbols."
  (if (inline-const-p types)
      (if (listp (inline-const-val types))
          (inline-quote (memq (org-element-type ,node t) ,types))
        (inline-quote (eq (org-element-type ,node t) ,types)))
    (inline-letevals (node types)
      (inline-quote
       (if (listp ,types)
           (memq (org-element-type ,node t) ,types)
         (eq (org-element-type ,node t) ,types))))))

with emacs -Q, indenting the file will yield different results with and
without executing (require 'inline).

With the patch, indentation becomes consistent.

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.39, cairo version 1.18.0) of 2024-01-28 built on localhost
Repository revision: 5e9ef5d65aea4c278bb58cfc84ea22e7983385da
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101010
System Description: Gentoo Linux

Configured using:
 'configure JAVAC=/etc/java-config-2/current-system-vm/bin/javac'


--=-=-=
Content-Type: text/patch
Content-Disposition: attachment;
 filename=0001-lisp-emacs-lisp-inline.el-Autoload-public-macros.patch

From c6f64171998a00c017e9dae5d7c96ad6d277adb5 Mon Sep 17 00:00:00 2001
Message-ID: <c6f64171998a00c017e9dae5d7c96ad6d277adb5.1706620775.git.yantar92@HIDDEN>
From: Ihor Radchenko <yantar92@HIDDEN>
Date: Tue, 30 Jan 2024 14:18:23 +0100
Subject: [PATCH] lisp/emacs-lisp/inline.el: Autoload public macros

* lisp/emacs-lisp/inline.el (inline-quote):
(inline-const-p):
(inline-const-val):
(inline-error):
(inline-letevals): Autoload macros that may appear inside
`define-inline'.  This is necessary to load the indentation rules when
Elisp code that uses `define-inline' is edited.
---
 lisp/emacs-lisp/inline.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lisp/emacs-lisp/inline.el b/lisp/emacs-lisp/inline.el
index c774296084e..af841c0458d 100644
--- a/lisp/emacs-lisp/inline.el
+++ b/lisp/emacs-lisp/inline.el
@@ -69,21 +69,25 @@
 
 (require 'macroexp)
 
+;;;###autoload
 (defmacro inline-quote (_exp)
   "Similar to backquote, but quotes code and only accepts , and not ,@."
   (declare (debug (backquote-form)))
   (error "inline-quote can only be used within define-inline"))
 
+;;;###autoload
 (defmacro inline-const-p (_exp)
   "Return non-nil if the value of EXP is already known."
   (declare (debug t))
   (error "inline-const-p can only be used within define-inline"))
 
+;;;###autoload
 (defmacro inline-const-val (_exp)
   "Return the value of EXP."
   (declare (debug t))
   (error "inline-const-val can only be used within define-inline"))
 
+;;;###autoload
 (defmacro inline-error (_format &rest _args)
   "Signal an error."
   (declare (debug t))
@@ -100,6 +104,7 @@ inline--letlisteval
   ;; inline-letevals, so signal the error in terms of the user's code.
   (error "inline-letevals can only be used within define-inline"))
 
+;;;###autoload
 (defmacro inline-letevals (vars &rest body)
   "Make sure the expressions in VARS are evaluated.
 VARS should be a list of elements of the form (VAR EXP) or just VAR, in case
-- 
2.43.0


--=-=-=
Content-Type: text/plain


-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

--=-=-=--




Acknowledgement sent to Ihor Radchenko <yantar92@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#68818; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 10 Nov 2025 12:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.