Mercurial > emacs
changeset 29877:7b43e1fb478a
(decode_eol_post_ccl): Special handling for undecided
and inconsistent EOL types.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Fri, 23 Jun 2000 05:30:34 +0000 |
parents | edfec1c0d511 |
children | dc466af33ca4 |
files | src/coding.c |
diffstat | 1 files changed, 10 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/coding.c Fri Jun 23 05:24:10 2000 +0000 +++ b/src/coding.c Fri Jun 23 05:30:34 2000 +0000 @@ -3944,13 +3944,19 @@ /* 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;