changeset 90631:b14bb2d35e4f

(Finsert_file_contents): On replacing, temporarily bind buffer-file-name to Qnil before calling insert_from_buffer.
author Kenichi Handa <handa@m17n.org>
date Mon, 23 Oct 2006 12:40:32 +0000
parents 59f79772323b
children 9438efdad8d0
files src/fileio.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c	Mon Oct 23 11:25:03 2006 +0000
+++ b/src/fileio.c	Mon Oct 23 12:40:32 2006 +0000
@@ -4360,6 +4360,10 @@
 	= (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.  */