]> git.eshelyaron.com Git - emacs.git/commitdiff
(shrink_encoding_region): If eol_type is not yet decided and
authorKenichi Handa <handa@m17n.org>
Thu, 13 Apr 2006 04:58:07 +0000 (04:58 +0000)
committerKenichi Handa <handa@m17n.org>
Thu, 13 Apr 2006 04:58:07 +0000 (04:58 +0000)
system_eol_type is not LF, don't shrink.

src/ChangeLog
src/coding.c

index 9955aabd0e7ec52c38caabda135cead5a40a0db0..d353e19eabf475e37289d6183fb435e5524a5f31 100644 (file)
@@ -3,6 +3,8 @@
        * coding.c (setup_coding_system): Fix previous change.
        (encode_coding): If eol_type is not yet decided, use
        system_eol_type.
+       (shrink_encoding_region): If eol_type is not yet decided and
+       system_eol_type is not LF, don't shrink.
 
 2006-04-13  Nick Roberts  <nickrob@snap.net.nz>
 
index 5fb4c202b8550bae14204002f40088eb48e390f8..ba121df242e4a63d1dd7488ce41e90847f627c6d 100644 (file)
@@ -5256,6 +5256,8 @@ shrink_encoding_region (beg, end, coding, str)
   if (coding->type == coding_type_ccl
       || coding->eol_type == CODING_EOL_CRLF
       || coding->eol_type == CODING_EOL_CR
+      || (coding->eol_type == CODING_EOL_UNDECIDED
+         && system_eol_type != CODING_EOL_LF)
       || (coding->cmp_data && coding->cmp_data->used > 0))
     {
       /* We can't skip any data.  */