]> code.delx.au - gnu-emacs/commit
Fix 'insert-file-contents' when REPLACE is non-nil
authorEli Zaretskii <eliz@gnu.org>
Wed, 22 Jun 2016 15:41:13 +0000 (18:41 +0300)
committerEli Zaretskii <eliz@gnu.org>
Wed, 22 Jun 2016 15:41:13 +0000 (18:41 +0300)
commit791193d309a0e8f60c3cdae2941c718d07411159
tree59fd8c49bbad4a7e2fcdf63802a20ec13c770b41
parentbbc58feac57d070a3b645b7a132ee3f3624b6ddd
Fix 'insert-file-contents' when REPLACE is non-nil

* src/fileio.c (maybe_move_gap): New function to move the gap to
the end of a buffer, if it isn't there already.
(Finsert_file_contents): Call 'maybe_move_gap' before using
conversion_buffer's text as a C 'char' array.  (Bug#23659)
* src/coding.c (decode_eol): Compute the byte increment before
calling del_range_2, because the latter can invalidate the pointer
to buffer text.
src/coding.c
src/fileio.c