summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoff Voelker <voelker@cs.washington.edu>1997-08-17 01:49:01 +0000
committerGeoff Voelker <voelker@cs.washington.edu>1997-08-17 01:49:01 +0000
commit70d00c7839273cbe4b9a7987f8b05ef0ead10d0d (patch)
tree8a0ec9f120d6536ea0fbed2ebd9ce3f728f53c15
parent6f459cf53ce9ad80d52d6a7df0c0a7142f1aebb4 (diff)
downloademacs-70d00c7839273cbe4b9a7987f8b05ef0ead10d0d.tar.gz
(Finsert_file_contents) [DOS_NT]: Set buffer_file_type
according to eol conversion used on file.
-rw-r--r--src/fileio.c21
1 files 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. */