# HG changeset patch # User Kenichi Handa # Date 1235011366 0 # Node ID a5023e8bbb1ed15d75289b91fcbabcd22dc040ed # Parent be12df124dbd947c1c5816711ed02754054dd5e0 (detect_coding): Preserve coding->mode. diff -r be12df124dbd -r a5023e8bbb1e src/coding.c --- a/src/coding.c Wed Feb 18 18:36:11 2009 +0000 +++ b/src/coding.c Thu Feb 19 02:42:46 2009 +0000 @@ -5955,6 +5955,7 @@ struct coding_system *coding; { const unsigned char *src, *src_end; + int saved_mode = coding->mode; coding->consumed = coding->consumed_char = 0; coding->produced = coding->produced_char = 0; @@ -6125,6 +6126,7 @@ setup_coding_system (XCDR (coding_systems), coding); } } + coding->mode = saved_mode; }