GNU bug report logs - #54648
27.2; Cannot autoload iter-defun

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Thu, 31 Mar 2022 07:42:02 UTC

Severity: normal

Tags: patch

Found in version 27.2

Done: Michael Heerdegen <michael_heerdegen <at> web.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 54648 in the body.
You can then email your comments to 54648 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#54648; Package emacs. (Thu, 31 Mar 2022 07:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo Liu <sdl.web <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 31 Mar 2022 07:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo Liu <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.2; Cannot autoload iter-defun
Date: Thu, 31 Mar 2022 15:41:19 +0800
I just discovered that autoload is broken in the following example:

  ;;;autoload
  (iter-defun i () (iter-yield 1))

The form is copied verbatim to the output and fails because of no
lexical-binding.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54648; Package emacs. (Thu, 31 Mar 2022 11:17:01 GMT) Full text and rfc822 format available.

Message #8 received at 54648 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 54648 <at> debbugs.gnu.org
Subject: Re: bug#54648: 27.2; Cannot autoload iter-defun
Date: Thu, 31 Mar 2022 13:16:07 +0200
Leo Liu <sdl.web <at> gmail.com> writes:

> I just discovered that autoload is broken in the following example:
>
>   ;;;autoload
>   (iter-defun i () (iter-yield 1))
>
> The form is copied verbatim to the output and fails because of no
> lexical-binding.

In emacs-28, the loaddefs files also have lexical binding, so this
should be fixed now.  

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 28.1, send any further explanations to 54648 <at> debbugs.gnu.org and Leo Liu <sdl.web <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 31 Mar 2022 11:17:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54648; Package emacs. (Thu, 31 Mar 2022 12:20:02 GMT) Full text and rfc822 format available.

Message #13 received at 54648 <at> debbugs.gnu.org (full text, mbox):

From: Leo Liu <sdl.web <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 54648 <at> debbugs.gnu.org
Subject: Re: bug#54648: 27.2; Cannot autoload iter-defun
Date: Thu, 31 Mar 2022 20:19:05 +0800
On 2022-03-31 13:16 +0200, Lars Ingebrigtsen wrote:
> In emacs-28, the loaddefs files also have lexical binding, so this
> should be fixed now.  

I think the bigger issue is copying the definition verbatim to loaddefs.
It should be handled like `defun' i.e. only the name is copied.

Leo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54648; Package emacs. (Thu, 31 Mar 2022 12:21:01 GMT) Full text and rfc822 format available.

Message #16 received at 54648 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 54648 <at> debbugs.gnu.org
Subject: Re: bug#54648: 27.2; Cannot autoload iter-defun
Date: Thu, 31 Mar 2022 14:20:47 +0200
Leo Liu <sdl.web <at> gmail.com> writes:

> I think the bigger issue is copying the definition verbatim to loaddefs.
> It should be handled like `defun' i.e. only the name is copied.

Yeah, that's true, I guess.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug No longer marked as fixed in versions 28.1 and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 31 Mar 2022 12:22:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54648; Package emacs. (Fri, 01 Apr 2022 22:59:02 GMT) Full text and rfc822 format available.

Message #21 received at 54648 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 54648 <at> debbugs.gnu.org, Leo Liu <sdl.web <at> gmail.com>
Subject: Re: bug#54648: 27.2; Cannot autoload iter-defun
Date: Sat, 02 Apr 2022 00:58:34 +0200
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Leo Liu <sdl.web <at> gmail.com> writes:
>
> > I think the bigger issue is copying the definition verbatim to loaddefs.
> > It should be handled like `defun' i.e. only the name is copied.
>
> Yeah, that's true, I guess.

This seems to work:

[0001-WIP-Fix-54648.patch (text/x-diff, inline)]
From 933e969c95e95cf8612b0dd99836f1c0d6b7e3d1 Mon Sep 17 00:00:00 2001
From: Michael Heerdegen <michael_heerdegen <at> web.de>
Date: Sat, 2 Apr 2022 00:56:09 +0200
Subject: [PATCH] WIP: Fix 54648

---
 lisp/emacs-lisp/autoload.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index 1e4b2c14a0..82956375bd 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -168,7 +168,7 @@ make-autoload
                        define-globalized-minor-mode defun defmacro
 		       easy-mmode-define-minor-mode define-minor-mode
                        define-inline cl-defun cl-defmacro cl-defgeneric
-                       cl-defstruct pcase-defmacro))
+                       cl-defstruct pcase-defmacro iter-defun))
            (macrop car)
 	   (setq expand (let ((load-true-file-name file)
                               (load-file-name file))
--
2.30.2

[Message part 3 (text/plain, inline)]

Michael.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54648; Package emacs. (Sat, 02 Apr 2022 11:17:02 GMT) Full text and rfc822 format available.

Message #24 received at 54648 <at> debbugs.gnu.org (full text, mbox):

From: Leo Liu <sdl.web <at> gmail.com>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 54648 <at> debbugs.gnu.org
Subject: Re: bug#54648: 27.2; Cannot autoload iter-defun
Date: Sat, 02 Apr 2022 19:15:59 +0800
On 2022-04-02 00:58 +0200, Michael Heerdegen wrote:
> This seems to work.

Looks good. Forgot only whitelisted macros are expanded. BTW could you
also include cl-iter-defun there?

Thanks,
Leo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54648; Package emacs. (Sat, 02 Apr 2022 13:05:01 GMT) Full text and rfc822 format available.

Message #27 received at 54648 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 54648 <at> debbugs.gnu.org, Leo Liu <sdl.web <at> gmail.com>
Subject: Re: bug#54648: 27.2; Cannot autoload iter-defun
Date: Sat, 02 Apr 2022 15:04:14 +0200
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> This seems to work:

Looks good to me.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) patch. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sat, 02 Apr 2022 15:39:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#54648; Package emacs. (Sun, 19 Jun 2022 19:05:01 GMT) Full text and rfc822 format available.

Message #32 received at 54648 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 54648 <at> debbugs.gnu.org,
 Leo Liu <sdl.web <at> gmail.com>
Subject: Re: bug#54648: 27.2; Cannot autoload iter-defun
Date: Sun, 19 Jun 2022 12:04:23 -0700
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Michael Heerdegen <michael_heerdegen <at> web.de> writes:
>
>> This seems to work:
>
> Looks good to me.

How about pushing this fix to master.  Michael?




Reply sent to Michael Heerdegen <michael_heerdegen <at> web.de>:
You have taken responsibility. (Tue, 21 Jun 2022 17:59:01 GMT) Full text and rfc822 format available.

Notification sent to Leo Liu <sdl.web <at> gmail.com>:
bug acknowledged by developer. (Tue, 21 Jun 2022 17:59:01 GMT) Full text and rfc822 format available.

Message #37 received at 54648-done <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 54648-done <at> debbugs.gnu.org,
 Leo Liu <sdl.web <at> gmail.com>
Subject: Re: bug#54648: 27.2; Cannot autoload iter-defun
Date: Tue, 21 Jun 2022 19:58:39 +0200
Stefan Kangas <stefan <at> marxist.se> writes:

> How about pushing this fix to master.  Michael?

Done.  I've also added the `cl-iter-defun' as had been suggested.

Michael.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 20 Jul 2022 11:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 279 days ago.

Previous Next


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