From: Stefan Monnier Date: Mon, 12 Sep 2011 02:22:22 +0000 (-0400) Subject: * src/fileio.c (Finsert_file_contents): Don't assume beg_offset is 0. X-Git-Tag: emacs-pretest-24.0.90~104^2~76 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2ba8e0088836fa1bfec2bdd6c92159b7805c399d;p=emacs.git * src/fileio.c (Finsert_file_contents): Don't assume beg_offset is 0. --- 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 + + * fileio.c (Finsert_file_contents): Don't assume beg_offset is 0. + 2011-09-11 Chong Yidong * 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--;