Mercurial > emacs
comparison src/coding.c @ 35995:b511edc4a348
(code_convert_region): After detecting a coding, if
nothing found, set coding->composing to COMPOSITION_NO.
(decode_coding_string): Likewise.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Thu, 08 Feb 2001 23:29:44 +0000 |
| parents | 7e767148cfdc |
| children | 05ef3feab39b |
comparison
equal
deleted
inserted
replaced
| 35994:5d5b201e0978 | 35995:b511edc4a348 |
|---|---|
| 5354 should not leave it undecided because the deeper | 5354 should not leave it undecided because the deeper |
| 5355 decoding routine (decode_coding) tries to detect the | 5355 decoding routine (decode_coding) tries to detect the |
| 5356 encodings again in vain. */ | 5356 encodings again in vain. */ |
| 5357 coding->type = coding_type_emacs_mule; | 5357 coding->type = coding_type_emacs_mule; |
| 5358 coding->category_idx = CODING_CATEGORY_IDX_EMACS_MULE; | 5358 coding->category_idx = CODING_CATEGORY_IDX_EMACS_MULE; |
| 5359 /* As emacs-mule decoder will handle composition, we | |
| 5360 need this setting to allocate coding->cmp_data | |
| 5361 later. */ | |
| 5362 coding->composing = COMPOSITION_NO; | |
| 5359 } | 5363 } |
| 5360 } | 5364 } |
| 5361 if (coding->eol_type == CODING_EOL_UNDECIDED | 5365 if (coding->eol_type == CODING_EOL_UNDECIDED |
| 5362 && coding->type != coding_type_ccl) | 5366 && coding->type != coding_type_ccl) |
| 5363 { | 5367 { |
| 5806 /* See the comments in code_convert_region. */ | 5810 /* See the comments in code_convert_region. */ |
| 5807 if (coding->type == coding_type_undecided) | 5811 if (coding->type == coding_type_undecided) |
| 5808 { | 5812 { |
| 5809 detect_coding (coding, XSTRING (str)->data, to_byte); | 5813 detect_coding (coding, XSTRING (str)->data, to_byte); |
| 5810 if (coding->type == coding_type_undecided) | 5814 if (coding->type == coding_type_undecided) |
| 5811 coding->type = coding_type_emacs_mule; | 5815 { |
| 5816 coding->type = coding_type_emacs_mule; | |
| 5817 coding->category_idx = CODING_CATEGORY_IDX_EMACS_MULE; | |
| 5818 /* As emacs-mule decoder will handle composition, we | |
| 5819 need this setting to allocate coding->cmp_data | |
| 5820 later. */ | |
| 5821 coding->composing = COMPOSITION_NO; | |
| 5822 } | |
| 5812 } | 5823 } |
| 5813 if (coding->eol_type == CODING_EOL_UNDECIDED | 5824 if (coding->eol_type == CODING_EOL_UNDECIDED |
| 5814 && coding->type != coding_type_ccl) | 5825 && coding->type != coding_type_ccl) |
| 5815 { | 5826 { |
| 5816 saved_coding_symbol = coding->symbol; | 5827 saved_coding_symbol = coding->symbol; |
