Subject: Re: bug#78851: 30.1.50; fileloop-continue should have autoload cookie

From: Eli Zaretskii <[email-masked]>
Date: Sun, 22 Jun 2025 08:44:53 +0300

> From: Howard Melman <[email-masked]>
> Date: Sat, 21 Jun 2025 21:52:06 -0400
> Cc: [email-masked]
> 
> On Jun 21, 2025, at 2:53 PM, Eli Zaretskii <[email-masked]> wrote:
> > 
> >> After startup, typing s-j causes the error previously reported.
> > 
> > Isn't that a bug in transient.el?  Binding a key to a command doesn't
> > require that the command be loaded:
> > 
> > $ emacs -Q
> > 
> > M-: (define-key global-map [f8] 'fileloop-continue) RET
> >   => fileloop-continue
> > C-h c F8
> >   => <f8> runs the command fileloop-continue
> > M-: (fboundp 'fileloop-continue) RET
> >   => nil
> > 
> > Why does transient signal an error in this case?
> 
> Could be, I don't know.

Jonas, any comments?

> >> Could you say why you are not convinced?
> > 
> > Because by that logic we will be asked to autoload every single
> > command, and that's definitely wrong.  Some customizations rightfully
> > need you to autoload or 'require' the corresponding package, and
> > that's alright.
> 
> I get the slippery slope argument, but I don't have an understanding of 
> which customizations can get an autoload vs which don't deserve one.

It's very simple: if the naïve customization signals an error about a
symbol that is unbound, you need to either autoload the offending
symbol or 'require' its package.  This has been always this way in
Emacs, nothing new here.

> My argument for why this does isn't because they all should, it's because
> it's the approved replacement for a command that does, and in fact
> for more (similar) commands, and because it would save 4 declare-function
> calls currently in emacs source which seems like it meets some threshold.

tags-loop-continue and tags-search in general were implemented
differently, so arguments like this are not convincing enough, sorry.

> I admit I'd care less if transient didn't signal an error.

Agreed.  Let's see what Jonas thinks about this.