From 04e6f79c441391a316d6e983a57ea03278116ce1 Mon Sep 17 00:00:00 2001 From: Geoff Voelker Date: Sun, 17 Aug 1997 01:49:01 +0000 Subject: [PATCH] (Finsert_file_contents) [DOS_NT]: Set buffer_file_type according to eol conversion used on file. --- src/fileio.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index 229e85352ec..303f9e143cd 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3083,16 +3083,6 @@ This does code conversion according to the value of\n\ setup_coding_system (Fcheck_coding_system (val), &coding); } -#ifdef DOS_NT - /* Use the conversion type to determine buffer-file-type - (find-buffer-file-type is now used to help determine the - conversion). */ - if (coding.type == coding_type_no_conversion) - current_buffer->buffer_file_type = Qt; - else - current_buffer->buffer_file_type = Qnil; -#endif - fd = -1; #ifndef APOLLO @@ -3618,6 +3608,17 @@ This does code conversion according to the value of\n\ inserted += this; } + +#ifdef DOS_NT + /* Use the conversion type to determine buffer-file-type + (find-buffer-file-type is now used to help determine the + conversion). */ + if (CODING_REQUIRE_EOL_CONVERSION (&coding)) + current_buffer->buffer_file_type = Qnil; + else + current_buffer->buffer_file_type = Qt; +#endif + /* We don't have to consider file type of MSDOS because all files are read as binary and end-of-line format has already been decoded appropriately. */ -- 2.39.5