changeset 30024:9fd285caeb51

(concat): While copying text properties, make each composition property value a copy.
author Kenichi Handa <handa@m17n.org>
date Tue, 04 Jul 2000 07:38:15 +0000
parents ec25786e4705
children c5eb8840659f
files src/fns.c
diffstat 1 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/fns.c	Tue Jul 04 07:37:30 2000 +0000
+++ b/src/fns.c	Tue Jul 04 07:38:15 2000 +0000
@@ -826,12 +826,22 @@
 
   if (num_textprops > 0)
     {
+      Lisp_Object props;
+
       for (argnum = 0; argnum < num_textprops; argnum++)
 	{
 	  this = args[textprops[argnum].argnum];
-	  copy_text_properties (make_number (textprops[argnum].from),
-				make_number (XSTRING (this)->size), this,
-				make_number (textprops[argnum].to), val, Qnil);
+	  props = text_property_list (this,
+				      make_number (0),
+				      make_number (XSTRING (this)->size),
+				      Qnil);
+	  /* If successive arguments have properites, be sure that the
+	     value of `composition' property be the copy.  */
+	  if (argnum > 0
+	      && textprops[argnum - 1].argnum + 1 == textprops[argnum].argnum)
+	    make_composition_value_copy (props);
+	  add_text_properties_from_list (val, props,
+					 make_number (textprops[argnum].to));
 	}
     }
   return val;