diff options
| author | Kenichi Handa | 2006-10-23 12:40:32 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2006-10-23 12:40:32 +0000 |
| commit | d07af40d882673ccb30c267a617e673c22a85ee4 (patch) | |
| tree | 32cc47f3ba911fc1dfbeb1eea7e61d4017e51734 /src | |
| parent | 465478d5749a61ba936eb36755bd357ccaa25453 (diff) | |
| download | emacs-d07af40d882673ccb30c267a617e673c22a85ee4.tar.gz emacs-d07af40d882673ccb30c267a617e673c22a85ee4.zip | |
(Finsert_file_contents): On replacing, temporarily bind
buffer-file-name to Qnil before calling insert_from_buffer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/fileio.c b/src/fileio.c index e45f9d59061..52a62cebe9c 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -4360,6 +4360,10 @@ actually used. */) | |||
| 4360 | = (buf_bytepos_to_charpos (XBUFFER (conversion_buffer), | 4360 | = (buf_bytepos_to_charpos (XBUFFER (conversion_buffer), |
| 4361 | same_at_start + inserted) | 4361 | same_at_start + inserted) |
| 4362 | - same_at_start_charpos); | 4362 | - same_at_start_charpos); |
| 4363 | /* This binding is to avoid ask-user-about-supersession-threat | ||
| 4364 | being called in insert_from_buffer (via in | ||
| 4365 | prepare_to_modify_buffer). */ | ||
| 4366 | specbind (intern ("buffer-file-name"), Qnil); | ||
| 4363 | insert_from_buffer (XBUFFER (conversion_buffer), | 4367 | insert_from_buffer (XBUFFER (conversion_buffer), |
| 4364 | same_at_start_charpos, inserted_chars, 0); | 4368 | same_at_start_charpos, inserted_chars, 0); |
| 4365 | /* Set `inserted' to the number of inserted characters. */ | 4369 | /* Set `inserted' to the number of inserted characters. */ |