diff src/file-coding.c @ 4100:d1cf2b9c4dfd

[xemacs-hg @ 2007-08-06 14:50:39 by michaels] 2007-07-31 Mike Sperber <mike@xemacs.org> * file-coding.c (undecided_convert): Kludge to prevent infinite recursion. * file-coding.c (detected_coding_system): Change default from raw-text to binary.
author michaels
date Mon, 06 Aug 2007 14:50:48 +0000
parents aa28d959af41
children cee827542370
line wrap: on
line diff
--- a/src/file-coding.c	Mon Aug 06 07:00:27 2007 +0000
+++ b/src/file-coding.c	Mon Aug 06 14:50:48 2007 +0000
@@ -3520,7 +3520,7 @@
 	    }
 	}
       if (NILP (retval))
-	retval = Fget_coding_system (Qraw_text);
+	retval = Fget_coding_system (Qbinary);
       return retval;
     }
   else
@@ -3869,6 +3869,9 @@
 		     random result when doing subprocess detection. */
 		  detect_coding_type (data->st, src, n);
 		  data->actual = detected_coding_system (data->st);
+		  /* kludge to prevent infinite recursion */
+		  if (XCODING_SYSTEM(data->actual)->methods->enumtype == undecided_coding_system)
+		    data->actual = Fget_coding_system (Qbinary);
 		}
 	    }
 	  /* We need to set the detected coding system if we actually have