diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/fileio.c b/src/fileio.c index 17be8acfaab..c3f2a2c9cba 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -3463,9 +3463,13 @@ actually used.") | |||
| 3463 | /* Prevent redisplay optimizations. */ | 3463 | /* Prevent redisplay optimizations. */ |
| 3464 | current_buffer->clip_changed = 1; | 3464 | current_buffer->clip_changed = 1; |
| 3465 | 3465 | ||
| 3466 | if (!NILP (beg) || !NILP (end)) | 3466 | if (!NILP (visit)) |
| 3467 | if (!NILP (visit)) | 3467 | { |
| 3468 | error ("Attempt to visit less than an entire file"); | 3468 | if (!NILP (beg) || !NILP (end)) |
| 3469 | error ("Attempt to visit less than an entire file"); | ||
| 3470 | if (BEG < Z && NILP (replace)) | ||
| 3471 | error ("Cannot do file visiting in a non-empty buffer"); | ||
| 3472 | } | ||
| 3469 | 3473 | ||
| 3470 | if (!NILP (beg)) | 3474 | if (!NILP (beg)) |
| 3471 | CHECK_NUMBER (beg, 0); | 3475 | CHECK_NUMBER (beg, 0); |