[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 60560cc7adf: Fix description of lexical environment's internals
From: |
Eli Zaretskii |
Subject: |
emacs-29 60560cc7adf: Fix description of lexical environment's internals |
Date: |
Tue, 18 Apr 2023 07:31:08 -0400 (EDT) |
branch: emacs-29
commit 60560cc7adfe685ef8c04623a6d019dc659123b1
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
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(-)
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-29 60560cc7adf: Fix description of lexical environment's internals,
Eli Zaretskii <=