Mercurial > emacs
diff src/lread.c @ 5185:52629d087993
(readevalloop): Get error if buffer being eval'd is killed.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 26 Nov 1993 02:18:54 +0000 |
parents | 951396781a0e |
children | 13cce14b5a0c |
line wrap: on
line diff
--- a/src/lread.c Thu Nov 25 21:47:07 1993 +0000 +++ b/src/lread.c Fri Nov 26 02:18:54 1993 +0000 @@ -618,6 +618,12 @@ 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 @@ while (1) { + if (b != 0 && NILP (b->name)) + error ("Reading from killed buffer"); + instream = stream; c = READCHAR; if (c == ';')