From: Richard M. Stallman Date: Fri, 26 Nov 1993 02:18:54 +0000 (+0000) Subject: (readevalloop): Get error if buffer being eval'd is killed. X-Git-Tag: emacs-19.34~10666 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=49cf7ff498099210390660721ef87684f32f7b76;p=emacs.git (readevalloop): Get error if buffer being eval'd is killed. --- diff --git a/src/lread.c b/src/lread.c index a897a871a4e..21da9c2c508 100644 --- a/src/lread.c +++ b/src/lread.c @@ -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 == ';')