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 #55 received at 54399 <at> debbugs.gnu.org (full text, mbox):

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: Re: bug#54399: 27.2; Problems with (let ((custom-variable ...))
 (autoload-function ...))
Date: Tue, 12 Apr 2022 11:04:49 -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.
>
> No, I just expect to refer to any of those consistently, I don't mind
> which one. If it's the buffer dimension, even inside let bindings, both
> forms should return "default".

If there's no buffer-local value and `default-value` operates in the
buffer-local dimension, why do you expect it to return a different value
from `symbol-value`?


        Stefan





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.