From: MORIOKA Tomohiko Date: Mon, 18 Feb 2013 10:03:08 +0000 (+0900) Subject: (find_char_feature_in_family): New implementation; don't support X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=878a50d58f543a7ef4c15dc56cb6cfb1cddb84d0;p=chise%2Fxemacs-chise.git- (find_char_feature_in_family): New implementation; don't support multiple parents; support non-list mother. --- 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; }