From: Kenichi Handa Date: Thu, 13 Apr 2006 04:58:07 +0000 (+0000) Subject: (shrink_encoding_region): If eol_type is not yet decided and X-Git-Tag: emacs-pretest-22.0.90~3164 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=73ec0f8900908f70f8b5daafc7f114f6e53a1ae2;p=emacs.git (shrink_encoding_region): If eol_type is not yet decided and system_eol_type is not LF, don't shrink. --- diff --git a/src/ChangeLog b/src/ChangeLog index 9955aabd0e7..d353e19eabf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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 diff --git a/src/coding.c b/src/coding.c index 5fb4c202b85..ba121df242e 100644 --- a/src/coding.c +++ b/src/coding.c @@ -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. */