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


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Ignacio Casso <ignaciocasso <at> hotmail.com>
Cc: michael_heerdegen <at> web.de, Eli Zaretskii <eliz <at> gnu.org>, 54399 <at> debbugs.gnu.org, larsi <at> gnus.org
Subject: bug#54399: 27.2; Problems with (let ((custom-variable ...)) (autoload-function ...))
Date: Tue, 12 Apr 2022 09:35:14 -0400
>> ;; default defined, buffer-local undefined
>> (defvar var1 "default")
>> (let ((var1 "inside let")) (default-value 'var1)) ;; returns "inside let"
>> 
>> ;; default defined, buffer-local defined
>> (defvar var2 "default")
>> (setq-local var2 "buffer-local")
>> (let ((var2 "inside let")) (default-value 'var2)) ;; returns "default"
>
> I would expect both snippets to return the same.

That's because you expect the "default" in `default-value` refers to the
let-nesting dimension rather than the buffer dimension.

BTW `set-default-toplevel-value` has a running time that's proportional
to the stack depth, whereas `default-value`, like `symbol-value` is
constant-time.

> P.S. By the way, I had deleted the previous emails on these thread, so I
> could not properly reply to the last one, and had to just write to
> 54399 <at> debbugs.gnu.org instead. What is the proper way to reply to an
> debbugs email thread that is no longer or never was in your inbox? For
> the org-mode mail list there is a link on the web archives, but not for
> debbugs.gnu.org. Is there a quick way from the debbugs package? Or maybe
> using some of the info in the mbox file, which can be downloaded from
> the archives in debbugs.gnu.org? Thanks

You can M-x gnu-emacs-bug RET 54399 RET and then you should be able to
select the message to which you want to reply.
[ The name is not `gnu-emacs-bug`, but that's the mnemonic I use, and
  the completion does the rest => `gnus-read-ephemeral-emacs-bug-group`.  ]

        Stefan





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

Previous Next


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