aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2000-01-04 08:15:09 +0000
committerKenichi Handa2000-01-04 08:15:09 +0000
commit9f57b6b4ef838e4bf025e1a253b89fd31d767c33 (patch)
tree18c121a39895456d4913301800b17b464af80b85 /src
parentdd9f0750da5c9180332815dcac4fa529d1747f8c (diff)
downloademacs-9f57b6b4ef838e4bf025e1a253b89fd31d767c33.tar.gz
emacs-9f57b6b4ef838e4bf025e1a253b89fd31d767c33.zip
(Finsert_file_contents): Signal error if visiting file
in a non-empty buffer.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c10
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);