diff options
-rw-r--r-- | src/ChangeLog | 4 | ||||
-rw-r--r-- | src/fileio.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 456c6aa0c3b..191462cb101 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-09-12 Stefan Monnier <monnier@iro.umontreal.ca> + + * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0. + 2011-09-11 Chong Yidong <cyd@stupidchicken.com> * minibuf.c (Fread_from_minibuffer): Doc fix. diff --git a/src/fileio.c b/src/fileio.c index e48fd89d7cb..08be41f9fe4 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3546,7 +3546,7 @@ variable `last-coding-system-used' to the coding system actually used. */) immediate_quit = 0; /* If the file matches the buffer completely, there's no need to replace anything. */ - if (same_at_start - BEGV_BYTE == end_offset) + if (same_at_start - BEGV_BYTE == end_offset - beg_offset) { emacs_close (fd); specpdl_ptr--; |