emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question reg. docstring of symbol-value


From: Robin Tarsiger
Subject: Re: Question reg. docstring of symbol-value
Date: Tue, 2 Nov 2021 15:59:58 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0

Arash Esbati wrote:
Is the intention to say "..., this returns the global value outside of
any lexical scope for symbols not marked as special" or something like
that?  Or am I missing something?
From the documentation for defvar:

> The ‘defvar’ form also declares the variable as "special", so that it
> is always dynamically bound even if ‘lexical-binding’ is t.

Basically, special variables don't get lexically bound in the first place,
so the let doesn't introduce a lexical binding for that variable; it
introduces a dynamic one, and dynamic bindings affect symbol-value.

-RTT



reply via email to

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