(Finsert_file_contents): In the case of replace,
authorKenichi Handa <handa@m17n.org>
Wed, 7 Jan 2009 12:28:19 +0000 (12:28 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 7 Jan 2009 12:28:19 +0000 (12:28 +0000)
remeber the coding system used for decoding in coding_system.

src/ChangeLog
src/fileio.c

index df6b576..101533e 100644 (file)
@@ -1,5 +1,9 @@
 2009-01-07  Kenichi Handa  <handa@m17n.org>
 
+       * fileio.c (Finsert_file_contents): In the case of replace,
+       remeber the coding system used for decoding in
+       coding_system (Bug#1039).
+
        * coding.c (decode_coding_utf_8): Check byte_after_cr before
        breaking the loop.  (Bug#870)
        (decode_coding_utf_16, decode_coding_emacs_mule)
index e358c3f..e916972 100644 (file)
@@ -3687,6 +3687,7 @@ variable `last-coding-system-used' to the coding system actually used.  */)
          coding.mode &= ~CODING_MODE_LAST_BLOCK;
        }
 
+      coding_system = CODING_ID_NAME (coding.id);
       decoded = BUF_BEG_ADDR (XBUFFER (conversion_buffer));
       inserted = (BUF_Z_BYTE (XBUFFER (conversion_buffer))
                  - BUF_BEG_BYTE (XBUFFER (conversion_buffer)));