Commit 49cf7ff4 authored by Richard M. Stallman's avatar Richard M. Stallman

(readevalloop): Get error if buffer being eval'd is killed.

parent 2752c6f9
......@@ -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 == ';')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment