# HG changeset patch # User Kenichi Handa # Date 1156738142 0 # Node ID a965377e676184f1dbd60881c51ea14ce8a01636 # Parent d6ffdba10de538a1b88a69ad9d056143260a688c (detect_coding_system): Fix for handling off inhibit_iso_escape_detection. Fix for the case that no coding system is defined for a specific coding category. diff -r d6ffdba10de5 -r a965377e6761 src/coding.c --- a/src/coding.c Mon Aug 28 02:37:18 2006 +0000 +++ b/src/coding.c Mon Aug 28 04:09:02 2006 +0000 @@ -7243,7 +7243,7 @@ break; if (c < 0x20 && (c == ISO_CODE_ESC || c == ISO_CODE_SI || c == ISO_CODE_SO) - && inhibit_iso_escape_detection) + && ! inhibit_iso_escape_detection) { coding.head_ascii = src - coding.source; if (detect_coding_iso_2022 (&coding, &detect_info)) @@ -7266,6 +7266,7 @@ for (i = 0; i < coding_category_raw_text; i++) { category = coding_priorities[i]; + this = coding_categories + category; if (detect_info.found & (1 << category)) break; } @@ -7349,7 +7350,8 @@ { found |= 1 << category; id = coding_categories[category].id; - val = Fcons (make_number (id), val); + if (id >= 0) + val = Fcons (make_number (id), val); } } for (i = coding_category_raw_text - 1; i >= 0; i--)