GNU bug report logs - #54399
27.2; Problems with (let ((custom-variable ...)) (autoload-function ...))

Previous Next

Package: emacs;

Reported by: Ignacio Casso <ignaciocasso <at> hotmail.com>

Date: Tue, 15 Mar 2022 15:53:02 UTC

Severity: normal

Tags: moreinfo

Found in version 27.2

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Ignacio Casso <ignaciocasso <at> hotmail.com>, 54399 <at> debbugs.gnu.org
Subject: Re: bug#54399: 27.2; Problems with (let ((custom-variable ...))
 (autoload-function ...))
Date: Fri, 18 Mar 2022 02:02:44 +0100
Michael Heerdegen <michael_heerdegen <at> web.de> writes:

> a104f656c8 Make defvar affect the default binding outside of any let.
> Stefan Monnier <monnier <at> iro.umontreal.ca> 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.




This bug report was last modified 2 years and 342 days ago.

Previous Next


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