[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:18:03 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
> (setq lexical-binding nil)
> (let ((another-fresh-var 1))
> (default-boundp 'another-fresh-var)) ;; I expect nil, it returns t
This means you misunderstand dynamic scoping or the meaning of
"default-" in `default-boundp` (it has nothing to do with let bindings
but is only concerned about buffer-local or not).
If you disregard lexical scoping, there are kinda to dimensions to
locality of variables: there's the "let" locality and there's the
"buffer" locality. They can be combined. `default-boundp/set-default`
only differ from `boundp/set` on the "buffer" dimension of locality.
Lexical scoping is yet a different beast because lexical variables have
fundamentally no name, so a lexical binding of variable `foo` has no
relation to what `boundp/set` see when passed `foo` as argument.
Stefan
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 ...)),
Stefan Monnier <=