diff options
author | Kenichi Handa <handa@m17n.org> | 2006-08-21 12:49:41 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2006-08-21 12:49:41 +0000 |
commit | 75421805fdc89b09743c9def0cfcc4e84b69ac4f (patch) | |
tree | 88e9d030ed847b89abdaa11020fee18eb04d8c95 /src/fileio.c | |
parent | 4a015c451a11c67ae830d2107c8b77052cb2d158 (diff) | |
download | emacs-75421805fdc89b09743c9def0cfcc4e84b69ac4f.tar.gz emacs-75421805fdc89b09743c9def0cfcc4e84b69ac4f.tar.bz2 emacs-75421805fdc89b09743c9def0cfcc4e84b69ac4f.zip |
(Finsert_file_contents): On recovering a file, assume
Unix-like eol.
(choose_write_coding_system): On auto-saving a file, force
Unix-like eol.
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/fileio.c b/src/fileio.c index a8408927f5c..bfef8756e01 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3917,7 +3917,7 @@ actually used. */) if (EQ (Vcoding_system_for_read, Qauto_save_coding)) { - coding_system = Qutf_8_emacs; + coding_system = coding_inherit_eol_type (Qutf_8_emacs, Qunix); setup_coding_system (coding_system, &coding); /* Ensure we set Vlast_coding_system_used. */ set_coding_system = 1; @@ -4806,11 +4806,15 @@ choose_write_coding_system (start, end, filename, struct coding_system *coding; { Lisp_Object val; + Lisp_Object eol_parent = Qnil; if (auto_saving && NILP (Fstring_equal (current_buffer->filename, current_buffer->auto_save_file_name))) - val = Qutf_8_emacs; + { + val = Qutf_8_emacs; + eol_parent = Qunix; + } else if (!NILP (Vcoding_system_for_write)) { val = Vcoding_system_for_write; @@ -4895,7 +4899,7 @@ choose_write_coding_system (start, end, filename, val = raw_text_coding_system (val); } - val = coding_inherit_eol_type (val, Qnil); + val = coding_inherit_eol_type (val, eol_parent); setup_coding_system (val, coding); if (!STRINGP (start) && !NILP (current_buffer->selective_display)) |