mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-05 11:45:45 +00:00
Fix description of lexical environment's internals
* doc/lispref/variables.texi (Lexical Binding): Update the description of how the lexical environment is represented internally. (Bug#62840)
This commit is contained in:
parent
1456adf424
commit
60560cc7ad
@ -1183,13 +1183,16 @@ wants the current value of a variable, it looks first in the lexical
|
||||
environment; if the variable is not specified in there, it looks in
|
||||
the symbol's value cell, where the dynamic value is stored.
|
||||
|
||||
(Internally, the lexical environment is an alist of symbol-value
|
||||
pairs, with the final element in the alist being the symbol @code{t}
|
||||
rather than a cons cell. Such an alist can be passed as the second
|
||||
argument to the @code{eval} function, in order to specify a lexical
|
||||
environment in which to evaluate a form. @xref{Eval}. Most Emacs
|
||||
Lisp programs, however, should not interact directly with lexical
|
||||
environments in this way; only specialized programs like debuggers.)
|
||||
(Internally, the lexical environment is a list whose members are
|
||||
usually cons cells that are symbol-value pairs, but some of its
|
||||
members can be symbols rather than cons cells. A symbol in the list
|
||||
means the lexical environment declared that symbol's variable as
|
||||
locally considered to be dynamically bound. This list can be passed
|
||||
as the second argument to the @code{eval} function, in order to
|
||||
specify a lexical environment in which to evaluate a form.
|
||||
@xref{Eval}. Most Emacs Lisp programs, however, should not interact
|
||||
directly with lexical environments in this way; only specialized
|
||||
programs like debuggers.)
|
||||
|
||||
@cindex closures, example of using
|
||||
Lexical bindings have indefinite extent. Even after a binding
|
||||
|
Loading…
Reference in New Issue
Block a user