From 60560cc7adfe685ef8c04623a6d019dc659123b1 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 18 Apr 2023 14:30:28 +0300 Subject: 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) --- doc/lispref/variables.texi | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'doc/lispref/variables.texi') 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 -- cgit v1.2.1