From 55607887e1a1a509d8030f04f1b6b9699fa469f6 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 10 Jun 1998 04:08:49 +0000 Subject: [PATCH] *** empty log message *** --- lispref/eval.texi | 16 ++++++++++------ lispref/loading.texi | 6 +++++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/lispref/eval.texi b/lispref/eval.texi index d49aba1cc16..80c07bf48a6 100644 --- a/lispref/eval.texi +++ b/lispref/eval.texi @@ -625,18 +625,22 @@ The number of currently active calls to @code{eval} is limited to @code{max-lisp-eval-depth} (see below). @end defun -@deffn Command eval-region start end &optional stream +@deffn Command eval-region start end &optional stream read-function 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 reached, or until an error is signaled and not handled. -If @var{stream} is supplied, @code{standard-output} is bound to it -during the evaluation. +If @var{stream} is non-@code{nil}, the values that result from +evaluating the expressions in the region are printed using @var{stream}. +@xref{Output Streams}. -You can use the variable @code{load-read-function} to specify a function -for @code{eval-region} to use instead of @code{read} for reading -expressions. @xref{How Programs Do Loading}. +If @var{read-function} is non-@code{nil}, it should be a function, which +is used instead of @code{read} to read expressions one by one. This +function is called with one argument, the stream for reading input. You +can also use the variable @code{load-read-function} (@pxref{How Programs +Do Loading}) to specify this function, but it is more robust to use the +@var{read-function} argument. @code{eval-region} always returns @code{nil}. @end deffn diff --git a/lispref/loading.texi b/lispref/loading.texi index a6efd6ebca2..fb2e3014b85 100644 --- a/lispref/loading.texi +++ b/lispref/loading.texi @@ -146,6 +146,10 @@ The function should accept one argument, just as @code{read} does. Normally, the variable's value is @code{nil}, which means those functions should use @code{read}. + +@strong{Note:} Instead of using this variable, it is cleaner to use +another, newer feature: to pass the function as the @var{read-function} +argument to @code{eval-region}. @xref{Eval}. @end defvar For information about how @code{load} is used in building Emacs, see @@ -720,7 +724,7 @@ The value of @code{load-history} may have one element whose @sc{car} is The command @code{eval-region} updates @code{load-history}, but does so by adding the symbols defined to the element for the file being visited, -rather than replacing that element. +rather than replacing that element. @xref{Eval}. @node Hooks for Loading @section Hooks for Loading -- 2.39.2