From 878a50d58f543a7ef4c15dc56cb6cfb1cddb84d0 Mon Sep 17 00:00:00 2001 From: MORIOKA Tomohiko Date: Mon, 18 Feb 2013 19:03:08 +0900 Subject: [PATCH] (find_char_feature_in_family): New implementation; don't support multiple parents; support non-list mother. --- src/chartab.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/chartab.c b/src/chartab.c index ba0083d..630b2a6 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -3340,6 +3340,7 @@ find_char_feature_in_family (Lisp_Object character, { Lisp_Object ancestors = Fget_char_attribute (character, con_feature, Qnil); +#if 0 while (!NILP (ancestors)) { @@ -3364,6 +3365,38 @@ find_char_feature_in_family (Lisp_Object character, if (!NILP (ret)) ancestors = nconc2 (Fcopy_sequence (ancestors), ret); } +#else + Lisp_Object ancestor; + + if (CONSP (ancestors)) + ancestor = XCAR (ancestors); + else + ancestor = ancestors; + + if (!NILP (ancestor)) + { + Lisp_Object ret; + Lisp_Object anc; + + if (EQ (ancestor, character)) + return Qunbound; + + ret = Fchar_feature (ancestor, feature, Qunbound, + Qnil, make_int (0)); + if (!UNBOUNDP (ret)) + return ret; + + ret = find_char_feature_in_family (ancestor, Q_subsumptive_from, + feature, feature_rel_max); + if (!UNBOUNDP (ret)) + return ret; + + ret = find_char_feature_in_family (ancestor, Q_denotational_from, + feature, feature_rel_max); + if (!UNBOUNDP (ret)) + return ret; + } +#endif return Qunbound; } -- 1.7.10.4