]> git.eshelyaron.com Git - emacs.git/commitdiff
(Finsert_file_contents): On replacing, temporarily bind
authorKenichi Handa <handa@m17n.org>
Mon, 23 Oct 2006 12:40:32 +0000 (12:40 +0000)
committerKenichi Handa <handa@m17n.org>
Mon, 23 Oct 2006 12:40:32 +0000 (12:40 +0000)
buffer-file-name to Qnil before calling insert_from_buffer.

src/fileio.c

index e45f9d59061b82e0046c7dae8562e8dc52fb7a77..52a62cebe9cc4341fae33caf5a24a7303440120b 100644 (file)
@@ -4360,6 +4360,10 @@ actually used.  */)
        = (buf_bytepos_to_charpos (XBUFFER (conversion_buffer),
                                   same_at_start + inserted)
           - same_at_start_charpos);
+      /* This binding is to avoid ask-user-about-supersession-threat
+        being called in insert_from_buffer (via in
+        prepare_to_modify_buffer).  */
+      specbind (intern ("buffer-file-name"), Qnil);
       insert_from_buffer (XBUFFER (conversion_buffer),
                          same_at_start_charpos, inserted_chars, 0);
       /* Set `inserted' to the number of inserted characters.  */