diff options
| author | Kenichi Handa | 2006-08-28 04:09:02 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2006-08-28 04:09:02 +0000 |
| commit | c7266f4a664781a7c893e7766c8a9ed17a839f2b (patch) | |
| tree | 128fdb57603e2845fc6fb349149d17949075b3ef /src | |
| parent | f26dba8483935acd3a13002bb18ef11e5a3a1013 (diff) | |
| download | emacs-c7266f4a664781a7c893e7766c8a9ed17a839f2b.tar.gz emacs-c7266f4a664781a7c893e7766c8a9ed17a839f2b.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/coding.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/coding.c b/src/coding.c index 98b40a38062..d8977227ec9 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -7243,7 +7243,7 @@ detect_coding_system (src, src_chars, src_bytes, highest, multibytep, | |||
| 7243 | break; | 7243 | break; |
| 7244 | if (c < 0x20 | 7244 | if (c < 0x20 |
| 7245 | && (c == ISO_CODE_ESC || c == ISO_CODE_SI || c == ISO_CODE_SO) | 7245 | && (c == ISO_CODE_ESC || c == ISO_CODE_SI || c == ISO_CODE_SO) |
| 7246 | && inhibit_iso_escape_detection) | 7246 | && ! inhibit_iso_escape_detection) |
| 7247 | { | 7247 | { |
| 7248 | coding.head_ascii = src - coding.source; | 7248 | coding.head_ascii = src - coding.source; |
| 7249 | if (detect_coding_iso_2022 (&coding, &detect_info)) | 7249 | if (detect_coding_iso_2022 (&coding, &detect_info)) |
| @@ -7266,6 +7266,7 @@ detect_coding_system (src, src_chars, src_bytes, highest, multibytep, | |||
| 7266 | for (i = 0; i < coding_category_raw_text; i++) | 7266 | for (i = 0; i < coding_category_raw_text; i++) |
| 7267 | { | 7267 | { |
| 7268 | category = coding_priorities[i]; | 7268 | category = coding_priorities[i]; |
| 7269 | this = coding_categories + category; | ||
| 7269 | if (detect_info.found & (1 << category)) | 7270 | if (detect_info.found & (1 << category)) |
| 7270 | break; | 7271 | break; |
| 7271 | } | 7272 | } |
| @@ -7349,7 +7350,8 @@ detect_coding_system (src, src_chars, src_bytes, highest, multibytep, | |||
| 7349 | { | 7350 | { |
| 7350 | found |= 1 << category; | 7351 | found |= 1 << category; |
| 7351 | id = coding_categories[category].id; | 7352 | id = coding_categories[category].id; |
| 7352 | val = Fcons (make_number (id), val); | 7353 | if (id >= 0) |
| 7354 | val = Fcons (make_number (id), val); | ||
| 7353 | } | 7355 | } |
| 7354 | } | 7356 | } |
| 7355 | for (i = coding_category_raw_text - 1; i >= 0; i--) | 7357 | for (i = coding_category_raw_text - 1; i >= 0; i--) |