Subject: Re: bug#54399: 27.2; Problems with (let ((custom-variable ...)) (autoload-function ...))

From: Michael Heerdegen <[email-masked]>
Date: Fri, 18 Mar 2022 02:02:44 +0100

Michael Heerdegen <[email-masked]> writes:

> a104f656c8 Make defvar affect the default binding outside of any let.
> Stefan Monnier <[email-masked]> Fri Aug 2 17:16:33 2013 -0400

And AFAIU this commit also fixed the problem for variables that are not
user options.  Now you can create a local special variable like this:

(defvar variable)
(let ((variable ...))
  (require ...) ...)

That has the desired effect (of binding variable dynamically) but any

(defvar variable ...)

form evaluated when loading still makes the VARIABLE special and sets
the global value.  Right?

Michael.