From: Kenichi Handa Date: Tue, 4 Jul 2000 07:36:58 +0000 (+0000) Subject: (make_composition_value_copy): New function. X-Git-Tag: emacs-pretest-21.0.90~2999 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c1361885c561f3e1178ff83160dbdd23b3cfb9d4;p=emacs.git (make_composition_value_copy): New function. --- diff --git a/src/composite.c b/src/composite.c index 085458db521..7da4c579ea7 100644 --- a/src/composite.c +++ b/src/composite.c @@ -534,6 +534,31 @@ update_compositions (from, to, check_mask) } } + +/* 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.