> From: Kenichi Handa <[EMAIL PROTECTED]> > CC: [EMAIL PROTECTED], [email protected] > Date: Wed, 12 Apr 2006 14:53:04 +0900 > > > However, the behavior of Emacs on non-Posix platforms under LANG=C > > raises a subtle issue. Right now, when LANG=C (or Posix), > > set-locale-environment sets up things so that the default > > buffer-file-coding-system is reset to nil, and that causes Emacs to > > create files with Unix-style EOL conversion. This happens because the > > "C" language is mapped to "ASCII", which specifies no encoding. Thus, > > set-language-environment resets the default coding systems to nil, and > > leaves it at that. Then the code which takes care of copying the EOL > > conversion from previous defaults doesn't do its thing. > > > The question is, is this a bug or a feature? That is, is it right for > > Emacs on MS-Windows to create Unix-style text files under LANG=C? I > > tend to think it's a bug, but I'm not sure. > > I agree that it's a bug.
So, given your explanation about the nil value of buffer-file-coding-system, do you agree that we need to change mule-cmds.el so that reset-language-environment sets the default buffer-file-coding-system to dos on MS-DOS and MS-Windows? Or are you saying that with your change in coding.c, the issue of creating new files is already taken care of, and no further changes are required? > If buffer-file-coding-system is dos, and some other file is > inserted with decoding, the buffer-file-coding-system is > changed to XXX-dos where, XXX part is the text-encoding part > of the coding-system used for that decoding. Do we want it to change to XXX-dos on Windows, or do we want the inserted file to determine EOL conversion as well? I tend to think that we want XXX-dos regardless of the inserted file. > And, on writing, coding-system is nil, it is treated as > raw-text-unix. I've just installed the attached change to > make it system-dependent; i.e. on Windows, nil is treated as > raw-text-dos. FYI, system_eol_type is set as this (in > init_coding_once): > > #if defined (MSDOS) || defined (WINDOWSNT) > system_eol_type = CODING_EOL_CRLF; > #else > system_eol_type = CODING_EOL_LF; > #endif > > What do you think? I think this is the right change. Thanks. _______________________________________________ emacs-pretest-bug mailing list [email protected] http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
