[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 11:04:49 -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.
>
> 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
- bug#54399: 27.2; Problems with (let ((custom-variable ...)) (autoload-function ...)), Ignacio Casso, 2022/04/12
- bug#54399: 27.2; Problems with (let ((custom-variable ...)) (autoload-function ...)), Eli Zaretskii, 2022/04/12
- bug#54399: 27.2; Problems with (let ((custom-variable ...)) (autoload-function ...)), Ignacio Casso, 2022/04/12
- bug#54399: 27.2; Problems with (let ((custom-variable ...)) (autoload-function ...)), Stefan Monnier, 2022/04/12
- bug#54399: 27.2; Problems with (let ((custom-variable ...)) (autoload-function ...)), Ignacio Casso, 2022/04/12
- bug#54399: 27.2; Problems with (let ((custom-variable ...)) (autoload-function ...)),
Stefan Monnier <=
- bug#54399: 27.2; Problems with (let ((custom-variable ...)) (autoload-function ...)), Ignacio Casso, 2022/04/12
- bug#54399: 27.2; Problems with (let ((custom-variable ...)) (autoload-function ...)), Stefan Monnier, 2022/04/12
- bug#54399: 27.2; Problems with (let ((custom-variable ...)) (autoload-function ...)), Ignacio Casso, 2022/04/13
- bug#54399: 27.2; Problems with (let ((custom-variable ...)) (autoload-function ...)), Michael Heerdegen, 2022/04/12
- bug#54399: 27.2; Problems with (let ((custom-variable ...)) (autoload-function ...)), Glenn Morris, 2022/04/12
- bug#54399: 27.2; Problems with (let ((custom-variable ...)) (autoload-function ...)), Michael Heerdegen, 2022/04/12
- bug#54399: 27.2; Problems with (let ((custom-variable ...)) (autoload-function ...)), Eli Zaretskii, 2022/04/12
- bug#54399: 27.2; Problems with (let ((custom-variable ...)) (autoload-function ...)), Ignacio Casso, 2022/04/13
bug#54399: 27.2; Problems with (let ((custom-variable ...)) (autoload-function ...)), Stefan Monnier, 2022/04/12