aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
authorEli Zaretskii2000-06-23 05:32:45 +0000
committerEli Zaretskii2000-06-23 05:32:45 +0000
commit74b01b80ee7a73710d9c17d3eaeadbea38181f8a (patch)
tree262f822940b1e7235fd3e6976edf7f28408c3f21 /src/coding.c
parentaffbf6477576c38d98111b55fbb1eb5b13d1a735 (diff)
downloademacs-74b01b80ee7a73710d9c17d3eaeadbea38181f8a.tar.gz
emacs-74b01b80ee7a73710d9c17d3eaeadbea38181f8a.zip
(decode_eol_post_ccl): Special handling for undecided
and inconsistent EOL types.
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c14
1 files changed, 10 insertions, 4 deletions
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)
3944 /* Here, to avoid the call of setup_coding_system, we directly 3944 /* Here, to avoid the call of setup_coding_system, we directly
3945 call detect_eol_type. */ 3945 call detect_eol_type. */
3946 coding->eol_type = detect_eol_type (ptr, bytes, &dummy); 3946 coding->eol_type = detect_eol_type (ptr, bytes, &dummy);
3947 val = Fget (coding->symbol, Qeol_type); 3947 if (coding->eol_type == CODING_EOL_INCONSISTENT)
3948 if (VECTORP (val) && XVECTOR (val)->size == 3) 3948 coding->eol_type = CODING_EOL_LF;
3949 coding->symbol = XVECTOR (val)->contents[coding->eol_type]; 3949 if (coding->eol_type != CODING_EOL_UNDECIDED)
3950 {
3951 val = Fget (coding->symbol, Qeol_type);
3952 if (VECTORP (val) && XVECTOR (val)->size == 3)
3953 coding->symbol = XVECTOR (val)->contents[coding->eol_type];
3954 }
3950 coding->mode |= CODING_MODE_INHIBIT_INCONSISTENT_EOL; 3955 coding->mode |= CODING_MODE_INHIBIT_INCONSISTENT_EOL;
3951 } 3956 }
3952 3957
3953 if (coding->eol_type == CODING_EOL_LF) 3958 if (coding->eol_type == CODING_EOL_LF
3959 || coding->eol_type == CODING_EOL_UNDECIDED)
3954 { 3960 {
3955 /* We have nothing to do. */ 3961 /* We have nothing to do. */
3956 ptr = pend; 3962 ptr = pend;