aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1993-11-26 02:18:54 +0000
committerRichard M. Stallman1993-11-26 02:18:54 +0000
commit49cf7ff498099210390660721ef87684f32f7b76 (patch)
tree69e1084d00d619bd58b32419bf1120bbeb9e3b0f /src
parent2752c6f9af543056c6abf3bdb916920563ab0907 (diff)
downloademacs-49cf7ff498099210390660721ef87684f32f7b76.tar.gz
emacs-49cf7ff498099210390660721ef87684f32f7b76.zip
(readevalloop): Get error if buffer being eval'd is killed.
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 == ';')