bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Stefan Monnier
Subject: bug#54399: 27.2; Problems with (let ((custom-variable ...)) (autoload-function ...))
Date: Tue, 12 Apr 2022 09:35:14 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>> ;; 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@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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]