Subject: bug#67325: shorthands: Incorrect autoloaded register-definition-prefixes

From: Eli Zaretskii <[email-masked]>
Date: Sun, 26 Nov 2023 20:07:15 +0200

> From: João Távora <[email-masked]>
> Date: Sun, 26 Nov 2023 14:14:28 +0000
> Cc: Eli Zaretskii <[email-masked]>, [email-masked], [email-masked], 
> 	Jonas Bernoulli <[email-masked]>
> 
> On Sat, Nov 25, 2023 at 12:44 PM João Távora <[email-masked]> wrote:
> 
> Earlier I said that 'autoload-compute-prefixes' was completely
> undocumented.  I was wrong, it is documented in loading.texi
> and perfectly defined in loaddefs-gen.el.  No idea why
> I didn't notice.
> 
> It even has a sane local safety specification, but that safety
> specification is not pre-loaded, so opening files
> with 'autoload-compute-prefixes' local variables has
> the unfortunate effect of prompting the user sometimes.
> 
> I think this should be fixed maybe somewhere in the
> prompting logic.  Even describing the variable will cause
> loaddefs-gen.el to be loaded the file and thus the safety
> specification.
> 
> Another option is to store just safety specification
> for this variable somewhere else, so that it is preloaded.
> 
> Eli, any comments about the above ideas?

I agree that we should not prompt when the safety predicate is
satisfied, but I don't have any idea how to do that.  Maybe Stefan
does?  E.g., can the (put 'autoload-compute-prefixes 'safe-local-variable
form be put in 'autoload'?