changeset 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 5d5b201e0978
children 3d6ad164318c
files src/coding.c
diffstat 1 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.c	Thu Feb 08 23:29:18 2001 +0000
+++ b/src/coding.c	Thu Feb 08 23:29:44 2001 +0000
@@ -5356,6 +5356,10 @@
 		 encodings again in vain.  */
 	      coding->type = coding_type_emacs_mule;
 	      coding->category_idx = CODING_CATEGORY_IDX_EMACS_MULE;
+	      /* As emacs-mule decoder will handle composition, we
+		 need this setting to allocate coding->cmp_data
+		 later.  */
+	      coding->composing = COMPOSITION_NO;
 	    }
 	}
       if (coding->eol_type == CODING_EOL_UNDECIDED
@@ -5808,7 +5812,14 @@
 	{
 	  detect_coding (coding, XSTRING (str)->data, to_byte);
 	  if (coding->type == coding_type_undecided)
-	    coding->type = coding_type_emacs_mule;
+	    {
+	      coding->type = coding_type_emacs_mule;
+	      coding->category_idx = CODING_CATEGORY_IDX_EMACS_MULE;
+	      /* As emacs-mule decoder will handle composition, we
+		 need this setting to allocate coding->cmp_data
+		 later.  */
+	      coding->composing = COMPOSITION_NO;
+	    }
 	}
       if (coding->eol_type == CODING_EOL_UNDECIDED
 	  && coding->type != coding_type_ccl)