]> git.eshelyaron.com Git - emacs.git/commitdiff
(coding_save_composition): Be sure to allocate
authorKenichi Handa <handa@m17n.org>
Thu, 2 Mar 2000 06:09:15 +0000 (06:09 +0000)
committerKenichi Handa <handa@m17n.org>
Thu, 2 Mar 2000 06:09:15 +0000 (06:09 +0000)
composition data area in coding even if there's no composition in
the current run.

src/coding.c

index 26a234c65223be01c5e7267a722020bd24f6eba2..40fe424fe05510c7faa2987249b536b40b2c4fb6 100644 (file)
@@ -4380,7 +4380,10 @@ coding_save_composition (coding, from, to, obj)
   Lisp_Object prop;
   int start, end;
 
-  coding->composing = COMPOSITION_DISABLED;
+  if (coding->composing == COMPOSITION_DISABLED)
+    return;
+  if (!coding->cmp_data)
+    coding_allocate_composition_data (coding, from);
   if (!find_composition (from, to, &start, &end, &prop, obj)
       || end > to)
     return;
@@ -4389,7 +4392,6 @@ coding_save_composition (coding, from, to, obj)
          || end > to))
     return;
   coding->composing = COMPOSITION_NO;
-  coding_allocate_composition_data (coding, from);
   do
     {
       if (COMPOSITION_VALID_P (start, end, prop))