mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-20 20:50:53 -08:00
(decode_eol_post_ccl): Special handling for undecided
and inconsistent EOL types.
This commit is contained in:
parent
affbf64775
commit
74b01b80ee
2 changed files with 15 additions and 4 deletions
14
src/coding.c
14
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue