emacs-devel
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]