diff options
author | Richard M. Stallman <[email protected]> | 2006-05-12 02:08:23 +0000 |
---|---|---|
committer | Richard M. Stallman <[email protected]> | 2006-05-12 02:08:23 +0000 |
commit | 1ed7b9ae26ca33b554a50c5225324334389408e4 (patch) | |
tree | 8c69c66ec9eff82434f57ad85b736b6a17b517dc /src | |
parent | 942efafab25cbdb3f0209068db242fb63a3b855a (diff) |
(readevalloop): Abort if START non-nil for non-buffer input.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 4 | ||||
-rw-r--r-- | src/lread.c | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 2b9587eeea..14a172d0b3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-05-11 Richard Stallman <[email protected]> + + * lread.c (readevalloop): Abort if START non-nil for non-buffer input. + 2006-05-11 Kim F. Storm <[email protected]> * xdisp.c (redisplay_tool_bar): Handle large tool-bar-border values. diff --git a/src/lread.c b/src/lread.c index 892c102c58..e80b228e76 100644 --- a/src/lread.c +++ b/src/lread.c @@ -1340,7 +1340,9 @@ end_of_file_error () /* UNIBYTE specifies how to set load_convert_to_unibyte for this invocation. READFUN, if non-nil, is used instead of `read'. - START, END is region in current buffer (from eval-region). */ + + START, END specify region to read in current buffer (from eval-region). + If the input is not from a buffer, they must be nil. */ static void readevalloop (readcharfun, stream, sourcename, evalfun, @@ -1376,6 +1378,10 @@ readevalloop (readcharfun, stream, sourcename, evalfun, else if (MARKERP (readcharfun)) b = XMARKER (readcharfun)->buffer; + /* We assume START is nil when input is not from a buffer. */ + if (! NILP (start) && !b) + abort (); + specbind (Qstandard_input, readcharfun); /* GCPROs readcharfun. */ specbind (Qcurrent_load_list, Qnil); record_unwind_protect (readevalloop_1, load_convert_to_unibyte ? Qt : Qnil); |