From: Eli Zaretskii Date: Fri, 23 Jun 2000 05:32:45 +0000 (+0000) Subject: (decode_eol_post_ccl): Special handling for undecided X-Git-Tag: emacs-pretest-21.0.90~3121 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=74b01b80ee7a73710d9c17d3eaeadbea38181f8a;p=emacs.git (decode_eol_post_ccl): Special handling for undecided and inconsistent EOL types. --- diff --git a/src/ChangeLog b/src/ChangeLog index f7ecf019999..4ccc973f0d3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2000-06-23 Eli Zaretskii + + * coding.c (decode_eol_post_ccl): Special handling for undecided + and inconsistent EOL types. + 2000-06-22 Gerd Moellmann * xrdb.c (x_load_resources): Add default resource for scroll bar's diff --git a/src/coding.c b/src/coding.c index d02c27dc478..a90795d781b 100644 --- a/src/coding.c +++ b/src/coding.c @@ -3944,13 +3944,19 @@ decode_eol_post_ccl (coding, ptr, bytes) /* Here, to avoid the call of setup_coding_system, we directly call detect_eol_type. */ coding->eol_type = detect_eol_type (ptr, bytes, &dummy); - val = Fget (coding->symbol, Qeol_type); - if (VECTORP (val) && XVECTOR (val)->size == 3) - coding->symbol = XVECTOR (val)->contents[coding->eol_type]; + if (coding->eol_type == CODING_EOL_INCONSISTENT) + coding->eol_type = CODING_EOL_LF; + if (coding->eol_type != CODING_EOL_UNDECIDED) + { + val = Fget (coding->symbol, Qeol_type); + if (VECTORP (val) && XVECTOR (val)->size == 3) + coding->symbol = XVECTOR (val)->contents[coding->eol_type]; + } coding->mode |= CODING_MODE_INHIBIT_INCONSISTENT_EOL; } - if (coding->eol_type == CODING_EOL_LF) + if (coding->eol_type == CODING_EOL_LF + || coding->eol_type == CODING_EOL_UNDECIDED) { /* We have nothing to do. */ ptr = pend;