]> git.eshelyaron.com Git - emacs.git/commitdiff
(detect_coding_system): Fix for handling off
authorKenichi Handa <handa@m17n.org>
Mon, 28 Aug 2006 04:09:02 +0000 (04:09 +0000)
committerKenichi Handa <handa@m17n.org>
Mon, 28 Aug 2006 04:09:02 +0000 (04:09 +0000)
inhibit_iso_escape_detection.  Fix for the case that no coding
system is defined for a specific coding category.

src/coding.c

index 98b40a380628a8e28a86070be53ecc70519f6099..d8977227ec917bc3ff74b805ea48c4056944dd92 100644 (file)
@@ -7243,7 +7243,7 @@ detect_coding_system (src, src_chars, src_bytes, highest, multibytep,
            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 @@ detect_coding_system (src, src_chars, src_bytes, highest, multibytep,
            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 @@ detect_coding_system (src, src_chars, src_bytes, highest, multibytep,
                {
                  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--)