aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lread.c9
1 files changed, 9 insertions, 0 deletions
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)
618 register Lisp_Object val; 618 register Lisp_Object val;
619 int count = specpdl_ptr - specpdl; 619 int count = specpdl_ptr - specpdl;
620 struct gcpro gcpro1; 620 struct gcpro gcpro1;
621 struct buffer *b = 0;
622
623 if (BUFFERP (readcharfun))
624 b = XBUFFER (readcharfun);
625 else if (MARKERP (readcharfun))
626 b = XMARKER (readcharfun)->buffer;
621 627
622 specbind (Qstandard_input, readcharfun); 628 specbind (Qstandard_input, readcharfun);
623 specbind (Qcurrent_load_list, Qnil); 629 specbind (Qcurrent_load_list, Qnil);
@@ -628,6 +634,9 @@ readevalloop (readcharfun, stream, sourcename, evalfun, printflag)
628 634
629 while (1) 635 while (1)
630 { 636 {
637 if (b != 0 && NILP (b->name))
638 error ("Reading from killed buffer");
639
631 instream = stream; 640 instream = stream;
632 c = READCHAR; 641 c = READCHAR;
633 if (c == ';') 642 if (c == ';')