mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-21 13:10:37 -08:00
(DECODE_COMPOSITION_START): If the source is short, set
coding->result to CODING_RESULT_INSUFFICIENT_SRC. (decode_coding_gap): Set CODING_MODE_LAST_BLOCK after the call of detect_coding.
This commit is contained in:
parent
26d19e0a9b
commit
9286b3338e
1 changed files with 5 additions and 3 deletions
|
|
@ -2808,8 +2808,10 @@ detect_coding_iso_2022 (coding, detect_info)
|
||||||
break; \
|
break; \
|
||||||
if (p == src_end - 1) \
|
if (p == src_end - 1) \
|
||||||
{ \
|
{ \
|
||||||
if (coding->mode & CODING_MODE_LAST_BLOCK) \
|
/* The current composition doesn't end in the current \
|
||||||
goto invalid_code; \
|
source. */ \
|
||||||
|
record_conversion_result \
|
||||||
|
(coding, CODING_RESULT_INSUFFICIENT_SRC); \
|
||||||
goto no_more_source; \
|
goto no_more_source; \
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
|
|
@ -6654,11 +6656,11 @@ decode_coding_gap (coding, chars, bytes)
|
||||||
coding->dst_pos = PT;
|
coding->dst_pos = PT;
|
||||||
coding->dst_pos_byte = PT_BYTE;
|
coding->dst_pos_byte = PT_BYTE;
|
||||||
coding->dst_multibyte = ! NILP (current_buffer->enable_multibyte_characters);
|
coding->dst_multibyte = ! NILP (current_buffer->enable_multibyte_characters);
|
||||||
coding->mode |= CODING_MODE_LAST_BLOCK;
|
|
||||||
|
|
||||||
if (CODING_REQUIRE_DETECTION (coding))
|
if (CODING_REQUIRE_DETECTION (coding))
|
||||||
detect_coding (coding);
|
detect_coding (coding);
|
||||||
|
|
||||||
|
coding->mode |= CODING_MODE_LAST_BLOCK;
|
||||||
decode_coding (coding);
|
decode_coding (coding);
|
||||||
|
|
||||||
attrs = CODING_ID_ATTRS (coding->id);
|
attrs = CODING_ID_ATTRS (coding->id);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue