diff options
author | Eli Zaretskii <eliz@gnu.org> | 2023-04-18 14:30:28 +0300 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2023-04-18 14:30:28 +0300 |
commit | 60560cc7adfe685ef8c04623a6d019dc659123b1 (patch) | |
tree | 14ce6616cceb4a8697465dff70b7154845c55b95 /doc/lispref/variables.texi | |
parent | 1456adf4248117b9889c6fa71f798ada2f45a3a4 (diff) | |
download | emacs-60560cc7adfe685ef8c04623a6d019dc659123b1.tar.gz |
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)
Diffstat (limited to 'doc/lispref/variables.texi')
-rw-r--r-- | doc/lispref/variables.texi | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index 5584cbce9a6..6dd935d8763 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -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 |