diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2019-07-02 16:04:16 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2019-07-02 16:04:16 -0400 |
commit | dc3093904d74a7c51d452439888c4f36e4274e9f (patch) | |
tree | b829cf7425eaea8a39ffddb3e771626bdf5d9bf0 /src/fileio.c | |
parent | 1c88af362f038c010f1a5c63e0ed5a431ba5d5a7 (diff) | |
download | emacs-dc3093904d74a7c51d452439888c4f36e4274e9f.tar.gz |
* src/insdel.c (insert_from_gap_1): New fun, extracted from insert_from_gap.
(insert_from_gap): Use it.
* src/lisp.h (insert_from_gap_1): Declare it.
* src/json.c (Fjson_insert):
* src/fileio.c (Finsert_file_contents): Use it.
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/fileio.c b/src/fileio.c index 7f4478a9448..fc938ebe1fa 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4436,17 +4436,7 @@ by calling `format-decode', which see. */) report_file_error ("Read error", orig_filename); /* Make the text read part of the buffer. */ - GAP_SIZE -= inserted; - GPT += inserted; - GPT_BYTE += inserted; - ZV += inserted; - ZV_BYTE += inserted; - Z += inserted; - Z_BYTE += inserted; - - if (GAP_SIZE > 0) - /* Put an anchor to ensure multi-byte form ends at gap. */ - *GPT_ADDR = 0; + insert_from_gap_1 (inserted, inserted, false); notfound: |