]> git.eshelyaron.com Git - emacs.git/commitdiff
(readevalloop): Get error if buffer being eval'd is killed.
authorRichard M. Stallman <rms@gnu.org>
Fri, 26 Nov 1993 02:18:54 +0000 (02:18 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 26 Nov 1993 02:18:54 +0000 (02:18 +0000)
src/lread.c

index a897a871a4e36ee4a7154325503d41f929b5d9ab..21da9c2c508b52e2cc5fd066cae38810e423f730 100644 (file)
@@ -618,6 +618,12 @@ readevalloop (readcharfun, stream, sourcename, evalfun, printflag)
   register Lisp_Object val;
   int count = specpdl_ptr - specpdl;
   struct gcpro gcpro1;
+  struct buffer *b = 0;
+
+  if (BUFFERP (readcharfun))
+    b = XBUFFER (readcharfun);
+  else if (MARKERP (readcharfun))
+    b = XMARKER (readcharfun)->buffer;
 
   specbind (Qstandard_input, readcharfun);
   specbind (Qcurrent_load_list, Qnil);
@@ -628,6 +634,9 @@ readevalloop (readcharfun, stream, sourcename, evalfun, printflag)
 
   while (1)
     {
+      if (b != 0 && NILP (b->name))
+       error ("Reading from killed buffer");
+
       instream = stream;
       c = READCHAR;
       if (c == ';')