]> git.eshelyaron.com Git - emacs.git/commit
* src/fileio.c: Fix bug#36431
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 9 Jul 2019 21:04:07 +0000 (17:04 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 9 Jul 2019 21:04:24 +0000 (17:04 -0400)
commitfec111c9ee7a248ac49ba1d6d62d3ef9473b7af9
treec88f33a33fbd4bba52c7b0e8310dcdfc99591065
parent4c619758b2806ee6607af7b1d56943e547001e7a
* src/fileio.c: Fix bug#36431

(decide_coding_unwind): Re-introduce.  Move text back to the gap.
Return the new `inserted` via the unwind_data.
(Finsert_file_contents): Use it.
Make sure `inserted` is always 0 when we jump straight to `notfound`.
Don't insert the text in the buffer until we know it's properly decoded
for the byteness of the buffer.

* test/src/fileio-tests.el (fileio-tests--insert-file-interrupt):
Allow insert-file-contents to return an empty buffer in case of
non-local exit in set-auto-coding-function.
src/fileio.c
test/src/fileio-tests.el