changeset 70595:136d07d2859f

(readevalloop): Abort if START non-nil for non-buffer input.
author Richard M. Stallman <rms@gnu.org>
date Fri, 12 May 2006 02:08:16 +0000
parents 590ca68c1970
children b59e192a86d6
files src/lread.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lread.c	Fri May 12 00:20:26 2006 +0000
+++ b/src/lread.c	Fri May 12 02:08:16 2006 +0000
@@ -1340,7 +1340,9 @@
 /* UNIBYTE specifies how to set load_convert_to_unibyte
    for this invocation.
    READFUN, if non-nil, is used instead of `read'.
-   START, END is region in current buffer (from eval-region).  */
+
+   START, END specify region to read in current buffer (from eval-region).
+   If the input is not from a buffer, they must be nil.  */
 
 static void
 readevalloop (readcharfun, stream, sourcename, evalfun,
@@ -1376,6 +1378,10 @@
   else if (MARKERP (readcharfun))
     b = XMARKER (readcharfun)->buffer;
 
+  /* We assume START is nil when input is not from a buffer.  */
+  if (! NILP (start) && !b)
+    abort ();
+
   specbind (Qstandard_input, readcharfun); /* GCPROs readcharfun.  */
   specbind (Qcurrent_load_list, Qnil);
   record_unwind_protect (readevalloop_1, load_convert_to_unibyte ? Qt : Qnil);