changeset 30022:6a52904a743b

(make_composition_value_copy): New function.
author Kenichi Handa <handa@m17n.org>
date Tue, 04 Jul 2000 07:36:58 +0000
parents 098362c40020
children ec25786e4705
files src/composite.c
diffstat 1 files changed, 25 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/composite.c	Tue Jul 04 04:50:20 2000 +0000
+++ b/src/composite.c	Tue Jul 04 07:36:58 2000 +0000
@@ -534,6 +534,31 @@
     }
 }
 
+
+/* Modify composition property values in LIST destructively.  LIST is
+   a list as returned from text_property_list.  Change values to the
+   top-level copies of them so that none of them are `eq'.  */
+
+void
+make_composition_value_copy (list)
+     Lisp_Object list;
+{
+  Lisp_Object plist, val;
+
+  for (; CONSP (list); list = XCDR (list))
+    {
+      plist = XCAR (XCDR (XCDR (XCAR (list))));
+      while (CONSP (plist) && CONSP (XCDR (plist)))
+	{
+	  if (EQ (XCAR (plist), Qcomposition)
+	      && (val = XCAR (XCDR (plist)), CONSP (val)))
+	    XCAR (XCDR (plist)) = Fcons (XCAR (val), XCDR (val));
+	  plist = XCDR (XCDR (plist));
+	}
+    }
+}
+
+
 /* Make text in the region between START and END a composition that
    has COMPONENTS and MODIFICATION-FUNC.