From 49cf7ff498099210390660721ef87684f32f7b76 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 26 Nov 1993 02:18:54 +0000 Subject: [PATCH] (readevalloop): Get error if buffer being eval'd is killed. --- src/lread.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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 == ';') -- 2.39.5