comparison 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
comparison
equal deleted inserted replaced
4099:a5e2d0f90f97 4100:d1cf2b9c4dfd
3518 "Invalid `default-buffer-file-coding-system', set to nil"); 3518 "Invalid `default-buffer-file-coding-system', set to nil");
3519 XBUFFER (Vbuffer_defaults)->buffer_file_coding_system = Qnil; 3519 XBUFFER (Vbuffer_defaults)->buffer_file_coding_system = Qnil;
3520 } 3520 }
3521 } 3521 }
3522 if (NILP (retval)) 3522 if (NILP (retval))
3523 retval = Fget_coding_system (Qraw_text); 3523 retval = Fget_coding_system (Qbinary);
3524 return retval; 3524 return retval;
3525 } 3525 }
3526 else 3526 else
3527 { 3527 {
3528 int likelihood; 3528 int likelihood;
3867 /* #### This is cheesy. What we really ought to do is buffer 3867 /* #### This is cheesy. What we really ought to do is buffer
3868 up a certain minimum amount of data so as to get a less 3868 up a certain minimum amount of data so as to get a less
3869 random result when doing subprocess detection. */ 3869 random result when doing subprocess detection. */
3870 detect_coding_type (data->st, src, n); 3870 detect_coding_type (data->st, src, n);
3871 data->actual = detected_coding_system (data->st); 3871 data->actual = detected_coding_system (data->st);
3872 /* kludge to prevent infinite recursion */
3873 if (XCODING_SYSTEM(data->actual)->methods->enumtype == undecided_coding_system)
3874 data->actual = Fget_coding_system (Qbinary);
3872 } 3875 }
3873 } 3876 }
3874 /* We need to set the detected coding system if we actually have 3877 /* We need to set the detected coding system if we actually have
3875 such a coding system but didn't before. That is the case 3878 such a coding system but didn't before. That is the case
3876 either when we just detected it in the previous code or when 3879 either when we just detected it in the previous code or when