]> code.delx.au - gnu-emacs/blobdiff - lispref/eval.texi
Update copyright for years from Emacs 21 to present (mainly adding
[gnu-emacs] / lispref / eval.texi
index 3c8a7a5e8a32fe578f7f7a06d515cdd053a3c24b..d085491d2d2c1535c9a7c82ee2078e358e82129b 100644 (file)
@@ -1,6 +1,7 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1998 Free Software Foundation, Inc.
+@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1998, 2001, 2002, 2003,
+@c   2004, 2005, 2006, 2007  Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../info/eval
 @node Evaluation, Control Structures, Symbols, Top
@@ -105,7 +106,7 @@ described below (@pxref{Forms}).
   A Lisp object that is intended to be evaluated is called a @dfn{form}.
 How Emacs evaluates a form depends on its data type.  Emacs has three
 different kinds of form that are evaluated differently: symbols, lists,
-and ``all other types''.  This section describes all three kinds, one by
+and ``all other types.''  This section describes all three kinds, one by
 one, starting with the ``all other types'' which are self-evaluating
 forms.
 
@@ -117,7 +118,7 @@ forms.
                              we find the real function via the symbol.
 * Function Forms::          Forms that call functions.
 * Macro Forms::             Forms that call macros.
-* Special Forms::           ``Special forms'' are idiosyncratic primitives,
+* Special Forms::           "Special forms" are idiosyncratic primitives,
                               most of them extremely important.
 * Autoloading::             Functions set up to load files
                               containing their real definitions.
@@ -313,16 +314,20 @@ symbol function indirection when calling @code{erste}.
 perform symbol function indirection explicitly.
 
 @c Emacs 19 feature
+@defun indirect-function function &optional noerror
 @anchor{Definition of indirect-function}
-@defun indirect-function 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 signals a @code{void-function} error if the final
-symbol is unbound and a @code{cyclic-function-indirection} error if
-there is a loop in the chain of symbols.
+This function signals a @code{void-function} error if the final symbol
+is unbound and optional argument @var{noerror} is @code{nil} or
+omitted.  Otherwise, if @var{noerror} is non-@code{nil}, it 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.
 
 Here is how you could define @code{indirect-function} in Lisp:
 
@@ -630,8 +635,8 @@ The number of currently active calls to @code{eval} is limited to
 @code{max-lisp-eval-depth} (see below).
 @end defun
 
-@anchor{Definition of eval-region}
 @deffn Command eval-region start end &optional stream read-function
+@anchor{Definition of eval-region}
 This function evaluates the forms in the current buffer in the region
 defined by the positions @var{start} and @var{end}.  It reads forms from
 the region and calls @code{eval} on them until the end of the region is
@@ -674,8 +679,8 @@ output of the output functions is printed in the echo area.
 @code{eval-current-buffer} is an alias for this command.
 @end deffn
 
-@anchor{Definition of max-lisp-eval-depth}
 @defvar max-lisp-eval-depth
+@anchor{Definition of max-lisp-eval-depth}
 This variable defines the maximum depth allowed in calls to @code{eval},
 @code{apply}, and @code{funcall} before an error is signaled (with error
 message @code{"Lisp nesting exceeds max-lisp-eval-depth"}).