GNU bug report logs - #78995
[PATCH] ;;;autoload-expand for special macros

Previous Next

Package: emacs;

Reported by: JD Smith <jdtsmith <at> gmail.com>

Date: Fri, 11 Jul 2025 19:29:02 UTC

Severity: normal

Tags: patch

Fixed in version 31

Done: "J.D. Smith" <jdtsmith <at> gmail.com>

Full log


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

From: "J.D. Smith" <jdtsmith <at> gmail.com>
To: 78995 <at> debbugs.gnu.org
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#78995: [PATCH] ;;;autoload-expand for special macros
Date: Wed, 23 Jul 2025 17:20:13 -0400
[Message part 1 (text/plain, inline)]
Stefan, can you take a look at this?

I think I now understand why there are slight differences in the
loaddefs.el file generated by my declare-based, eager-loading patch.
There is a /bug/ in the fallback "list 3" generation of autoloads,
leading to incorrect autoload statements being written out.

The `INTERACTIVE' arg to `autoload' is supposed to be formed as follows:

  If INTERACTIVE is a list, it is interpreted as a list of modes the
  function is applicable for.

The current code mistakenly injects the actual ARG-DESCRIPTOR list into
the autoload file, for those (few) macros which are not expanded but
fall through to list 2, possibly just `cl-defun's.  You might see for
example the full `(let...` descriptors for `erc` in your loaddefs.el
file.

That's a bug I believe, and will presumably mess with the mode-specific
M-S-x type functionality. So by expanding more eagerly with `(declare
(autoload macro-expand))', this bug was "eliminated".  The attached
fixes it for any cases which still use fall-through to list 2.

Thoughts?


[autoload-bug.patch (text/x-patch, attachment)]

This bug report was last modified 27 days ago.

Previous Next


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