XEmacs 21.2.33 "Melpomene".
[chise/xemacs-chise.git.1] / src / file-coding.c
index 9db68c7..8c54aaf 100644 (file)
@@ -1071,6 +1071,7 @@ Return the coding-system symbol for which symbol ALIAS is an alias.
     return aliasee;
   else
     signal_simple_error ("Symbol is not a coding system alias", alias);
+  return Qnil;         /* To keep the compiler happy */
 }
 
 static Lisp_Object
@@ -2239,6 +2240,13 @@ reset_decoding_stream (struct decoding_stream *str)
     }
   str->counter = 0;
 #endif /* MULE */
+  if (CODING_SYSTEM_TYPE (str->codesys) == CODESYS_AUTODETECT
+      || CODING_SYSTEM_EOL_TYPE (str->codesys) == EOL_AUTODETECT)
+    {
+      xzero (str->decst);
+      str->decst.eol_type = EOL_AUTODETECT;
+      str->decst.mask = ~0;
+    }
   str->flags = str->ch = 0;
 }