[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Unbinding let-bound built-in variables
From: |
Po Lu |
Subject: |
Unbinding let-bound built-in variables |
Date: |
Thu, 23 May 2024 14:28:00 +0800 |
set_internal clears the forwarding pointer of a symbol when the new
value is Qunbound, which is reasonable if the symbol should be globally
bound, but has the undesired effect of disconnecting a symbol's value
from its forwarding pointer when its binding will be reestablished once
a let-binding is unwound:
(let ((initial-window-system 'foo))
(makunbound 'initial-window-system)
initial-window-system)
initial-window-system => x
(gdb) p Vinitial_window_system
$1 = XIL(0x834fa10)
(gdb) xsymbol
$2 = (struct Lisp_Symbol *) 0x8fac130
"foo"
How do you suggest that this be resolved? I'm quite loath to introduce
another field in the *fwds holding whether the symbol is bound, or to
save forwarding pointers in specbindings, as either of these solutions
would conflict with another ongoing project of mine (as does the current
arrangement, which I am attempting to eliminate), and strikes me as not
terribly elegant. Let me also ask whether it is really worth the while
to permit let-bound built-in symbols to be unbound in the first place?
- Unbinding let-bound built-in variables,
Po Lu <=
- Re: Unbinding let-bound built-in variables, Eli Zaretskii, 2024/05/23
- Re: Unbinding let-bound built-in variables, Po Lu, 2024/05/23
- Re: Unbinding let-bound built-in variables, Eli Zaretskii, 2024/05/23
- Re: Unbinding let-bound built-in variables, Po Lu, 2024/05/23
- Re: Unbinding let-bound built-in variables, Eli Zaretskii, 2024/05/23
- Re: Unbinding let-bound built-in variables, Po Lu, 2024/05/23
- Re: Unbinding let-bound built-in variables, Eli Zaretskii, 2024/05/23
Re: Unbinding let-bound built-in variables, Stefan Monnier, 2024/05/23