summaryrefslogtreecommitdiff
path: root/doc/lispref/eval.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/lispref/eval.texi')
-rw-r--r--doc/lispref/eval.texi50
1 files changed, 31 insertions, 19 deletions
diff --git a/doc/lispref/eval.texi b/doc/lispref/eval.texi
index a65b2346300..b42020f43af 100644
--- a/doc/lispref/eval.texi
+++ b/doc/lispref/eval.texi
@@ -252,11 +252,8 @@ the original symbol. If the contents are another symbol, this
process, called @dfn{symbol function indirection}, is repeated until
it obtains a non-symbol. @xref{Function Names}, for more information
about symbol function indirection.
-
- One possible consequence of this process is an infinite loop, in the
-event that a symbol's function cell refers to the same symbol.
-Otherwise, we eventually obtain a non-symbol, which ought to be a
-function or other suitable object.
+We eventually obtain a non-symbol, which ought to be a function or
+other suitable object.
@kindex invalid-function
More precisely, we should now have a Lisp function (a lambda
@@ -332,19 +329,17 @@ or just
The built-in function @code{indirect-function} provides an easy way to
perform symbol function indirection explicitly.
-@defun indirect-function function &optional noerror
+@defun indirect-function function
@anchor{Definition of indirect-function}
This function returns the meaning of @var{function} as a function. If
@var{function} is a symbol, then it finds @var{function}'s function
definition and starts over with that value. If @var{function} is not a
symbol, then it returns @var{function} itself.
-This function returns @code{nil} if the final symbol is unbound. It
-signals a @code{cyclic-function-indirection} error if there is a loop
-in the chain of symbols.
+This function returns @code{nil} if the final symbol is unbound.
-The optional argument @var{noerror} is obsolete, kept for backward
-compatibility, and has no effect.
+There is also a second, optional argument that is obsolete and has no
+effect.
Here is how you could define @code{indirect-function} in Lisp:
@@ -745,13 +740,17 @@ type of the @var{form} object determines how it is evaluated.
@xref{Forms}.
The argument @var{lexical} specifies the scoping rule for local
-variables (@pxref{Variable Scoping}). If it is omitted or @code{nil},
-that means to evaluate @var{form} using the default dynamic scoping
-rule. If it is @code{t}, that means to use the lexical scoping rule.
-The value of @var{lexical} can also be a non-empty alist specifying a
+variables (@pxref{Variable Scoping}). If it is @code{t}, that means
+to evaluate @var{form} using lexical scoping; this is the recommended
+value. If it is omitted or @code{nil}, that means to use the old
+dynamic-only variable scoping rule.
+
+The value of @var{lexical} can also be a non-empty list specifying a
particular @dfn{lexical environment} for lexical bindings; however,
this feature is only useful for specialized purposes, such as in Emacs
-Lisp debuggers. @xref{Lexical Binding}.
+Lisp debuggers. Each member of the list is either a cons cell which
+represents a lexical symbol-value pair, or a symbol representing a
+(special) variable that would use dynamic scoping if bound.
Since @code{eval} is a function, the argument expression that appears
in a call to @code{eval} is evaluated twice: once as preparation before
@@ -845,11 +844,24 @@ function body forms, as well as explicit calls in Lisp code.
The default value of this variable is 1600. If you set it to a value
less than 100, Lisp will reset it to 100 if the given value is
-reached. Entry to the Lisp debugger increases the value, if there is
-little room left, to make sure the debugger itself has room to
-execute.
+reached.
@end defopt
+@defopt lisp-eval-depth-reserve
+In order to be able to debug infinite recursion errors, when invoking the
+Lisp debugger, Emacs increases temporarily the value of
+@code{max-lisp-eval-depth}, if there is little room left, to make sure
+the debugger itself has room to execute. The same happens when
+running the handler of a @code{handler-bind}. @xref{Handling Errors}.
+
+The variable @code{lisp-eval-depth-reserve} bounds the extra depth
+that Emacs can add to @code{max-lisp-eval-depth} for those
+exceptional circumstances.
+
+The default value of this variable is 200.
+@end defopt
+
+
@defvar values
The value of this variable is a list of the values returned by all the
expressions that were read, evaluated, and printed from buffers