[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: defvar without value
From: |
Michael Heerdegen |
Subject: |
Re: defvar without value |
Date: |
Thu, 02 Apr 2020 00:45:40 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
> I guess we could add something like (defvar-dynamic VAR) which sets the
> `special` bit on the variable, just like (defvar VAR VAL) does, but
> leaves the variable's value unchanged (currently, you'd have to do
> (progn (defvar VAR 'dummy) (makunbound 'VAR)) to get a similar
> effect).
Yes, I guess that would be nice... we/you/someone wanted to add `fluid-let'
(i.e. a dynamically binding `let') anyway. I guess this can all be done
at once.
> Similarly, we could add something like (defvar-lexical VAR VAL) which
> defines the var and sets it but doesn't set the `special` bit
Uses of that exceed my current imagination. Ah, ok, following
(top-level) defuns would become closures referencing the VAR
automatically, right?
Michael.
- Re: defvar without value,
Michael Heerdegen <=
- Re: defvar without value, Stefan Monnier, 2020/04/01
- Re: defvar without value, Michael Heerdegen, 2020/04/08
- Re: defvar without value, Emanuel Berg, 2020/04/08
- Re: defvar without value, Stefan Monnier, 2020/04/08
- Re: defvar without value, Emanuel Berg, 2020/04/09
- Re: defvar without value, Bruno FĂ©lix Rezende Ribeiro, 2020/04/10
- Re: defvar without value, Emanuel Berg, 2020/04/10
- Re: defvar without value, Michael Heerdegen, 2020/04/10