From: MORIOKA Tomohiko Date: Fri, 9 Feb 2018 06:45:38 +0000 (+0900) Subject: Merge branch 'master' into single-inheritance X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=25314bf2881c2d13f3a4cbfc4dda8f33708f3301;hp=e43fbcf933463fe92a750e5fc62c89a3229aeb46;p=chise%2Fxemacs-chise.git- Merge branch 'master' into single-inheritance --- diff --git a/lisp/utf-2000/ChangeLog b/lisp/utf-2000/ChangeLog index 8e10a05..8dd72d5 100644 --- a/lisp/utf-2000/ChangeLog +++ b/lisp/utf-2000/ChangeLog @@ -9632,6 +9632,11 @@ 2016-11-21 MORIOKA Tomohiko + * ideograph-util.el (char-representative-of-daikanwa): Don't make + temporal lists for `<-subsumptive' and `<-denotational'. + +2016-11-21 MORIOKA Tomohiko + * Ideograph-R009-Man.el (G-IU+202E1): New abstract glyph node to subsume g2-IU+202E1 and g2-CU+202E1. @@ -9694,6 +9699,20 @@ 2016-11-16 MORIOKA Tomohiko + * ideograph-util.el (update-ideograph-radical-table): Modify for + `<-subsumptive'. + (char-representative-of-daikanwa): Modify for `<-subsumptive' and + `<-denotational'. + (char-daikanwa): Likewise. + + * chise-subr.el (map-char-family): Modify for `<-subsumptive' and + `<-denotational'. + + * char-db-util.el (char-db-insert-relation-feature): Accept + character as argument `value'. + +2016-11-16 MORIOKA Tomohiko + * Ideograph-R027-Cliff.el (A-UU+53A9): New abstract node; use `<-denotational' for U+53A9. (UU+53A9): Use A-UU+53A9 instead of U+53A9 as the mother. diff --git a/lisp/utf-2000/char-db-util.el b/lisp/utf-2000/char-db-util.el index 806b153..95dd579 100644 --- a/lisp/utf-2000/char-db-util.el +++ b/lisp/utf-2000/char-db-util.el @@ -785,6 +785,8 @@ (let ((lbs (concat "\n" (make-string (current-column) ?\ ))) separator cell sources required-features ret) + (if (characterp value) + (setq value (list value))) (while (consp value) (setq cell (car value)) (if (integerp cell) diff --git a/lisp/utf-2000/chise-subr.el b/lisp/utf-2000/chise-subr.el index c6e968c..7f6fcbe 100644 --- a/lisp/utf-2000/chise-subr.el +++ b/lisp/utf-2000/chise-subr.el @@ -1,7 +1,7 @@ ;;; chise-subr.el --- basic lisp subroutines for XEmacs CHISE ;; Copyright (C) 1999, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, -;; 2010, 2011, 2012, 2013, 2014, 2015 MORIOKA Tomohiko. +;; 2010, 2011, 2012, 2013, 2014, 2015, 2016 MORIOKA Tomohiko. ;; Author: MORIOKA Tomohiko ;; Keywords: CHISE, Character Database, ISO/IEC 10646, UCS, Unicode, MULE. @@ -243,9 +243,15 @@ (get-char-attribute (car rest) '->denotational) (get-char-attribute (car rest) '->identical))) (unless ignore-sisters - (setq rest (append rest - (get-char-attribute (car rest) '<-subsumptive) - (get-char-attribute (car rest) '<-denotational))))) + (setq rest + (append rest + (if (setq ret (get-char-attribute + (car rest) '<-subsumptive)) + (list ret)) + (if (setq ret (get-char-attribute + (car rest) '<-denotational)) + (list ret)) + )))) (setq rest (cdr rest)))))) diff --git a/lisp/utf-2000/ideograph-util.el b/lisp/utf-2000/ideograph-util.el index 70f4171..6106cbc 100644 --- a/lisp/utf-2000/ideograph-util.el +++ b/lisp/utf-2000/ideograph-util.el @@ -1,7 +1,7 @@ ;;; ideograph-util.el --- Ideographic Character Database utility ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, -;; 2009, 2010, 2012, 2014, 2015 MORIOKA Tomohiko. +;; 2009, 2010, 2012, 2014, 2015, 2016 MORIOKA Tomohiko. ;; Author: MORIOKA Tomohiko ;; Keywords: CHISE, Chaon model, ISO/IEC 10646, Unicode, UCS-4, MULE. @@ -53,6 +53,7 @@ (get-char-attribute chr '<-subsumptive)) (progn (setq dest nil) + (setq ret (list ret)) (dolist (pc ret) (unless (eq (get-char-attribute pc 'ideographic-radical) @@ -60,7 +61,7 @@ (if (setq rret (get-char-attribute pc '<-subsumptive)) - (setq ret (append ret rret)) + (setq ret (append ret (list rret))) (setq dest (cons pc dest))))) dest) (list chr)) @@ -227,16 +228,29 @@ (throw 'tag ret)) (setq checked (cons sc checked) rest (cdr rest))) - (setq rest - (append (get-char-attribute char '<-subsumptive) - (get-char-attribute char '<-denotational))) - (while rest - (setq sc (car rest)) - (when (setq ret (char-representative-of-daikanwa - sc radical t checked)) - (throw 'tag ret)) - (setq checked (cons sc checked) - rest (cdr rest)))))) + ;; (setq rest + ;; (append (get-char-attribute char '<-subsumptive) + ;; (get-char-attribute char '<-denotational))) + ;; (while rest + ;; (setq sc (car rest)) + ;; (when (setq ret (char-representative-of-daikanwa + ;; sc radical t checked)) + ;; (throw 'tag ret)) + ;; (setq checked (cons sc checked) + ;; rest (cdr rest))) + (when (setq sc (get-char-attribute char '<-subsumptive)) + (if (setq ret (char-representative-of-daikanwa + sc radical t checked)) + (throw 'tag ret) + (setq checked (cons sc checked)) + nil)) + (when (setq sc (get-char-attribute char '<-denotational)) + (if (setq ret (char-representative-of-daikanwa + sc radical t checked)) + (throw 'tag ret) + (setq checked (cons sc checked)) + nil)) + ))) (unless ignore-default char))))) @@ -349,8 +363,12 @@ rest (cdr rest))) (setq rest (append - (get-char-attribute char '<-subsumptive) - (get-char-attribute char '<-denotational) + (if (setq ret (get-char-attribute + char '<-subsumptive)) + (list ret)) + (if (setq ret (get-char-attribute + char '<-denotational)) + (list ret)) (get-char-attribute char '<-denotational@component) )) (while rest diff --git a/src/ChangeLog b/src/ChangeLog index 764402a..97d3c0c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,18 @@ 2016-11-17 MORIOKA Tomohiko + * chartab.h: Undefine `USE_CONCORD_OBJECT_SYSTEM' to avoid the + Concord Object System. + +2016-11-16 MORIOKA Tomohiko + + * chartab.c (Fput_char_attribute): Use single-inheritance format + for character definitions; namely a value of `<-subsumptive' or + `<-denotational' must be a character instead of a list of + characters. + +2016-11-17 MORIOKA Tomohiko + * chartab.h (USE_CONCORD_OBJECT_SYSTEM): New macro; use it instead of `HAVE_LIBCHISE' to detect to use Concord Object System. (USE_CONCORD_OBJECT_SYSTEM_TO_COMPOSE): New macro. diff --git a/src/chartab.c b/src/chartab.c index 7c1408ae..dff4a22 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -3656,26 +3656,104 @@ Store CHARACTER's ATTRIBUTE with VALUE. Fput_char_attribute (make_char (c), Q_ucs_unified, Fcons (character, ret)); } - if ( EQ (attribute, Q_subsumptive) || - EQ (attribute, Q_subsumptive_from) || - EQ (attribute, Q_denotational) || - EQ (attribute, Q_denotational_from) || - EQ (attribute, Q_identical) || - EQ (attribute, Q_identical_from) || - EQ (attribute, Q_canonical) || - EQ (attribute, Q_halfwidth_of) || - EQ (attribute, Q_superscript_of) || - EQ (attribute, Q_subscript_of) || - EQ (attribute, Q_circled_of) || - EQ (attribute, Q_component) || - EQ (attribute, Q_component_of) || - ( !EQ (attribute, Q_ucs_unified) - && !NILP (Fstring_match - (build_string ("^\\(<-\\|->\\)[^*]*$"), - Fsymbol_name (attribute), - Qnil, Qnil)) - ) - ) + if ( EQ (attribute, Q_subsumptive_from) || + EQ (attribute, Q_denotational_from) ) + { + Lisp_Object ret; + Lisp_Object rev_feature = Qnil; + + if (EQ (attribute, Q_subsumptive_from)) + rev_feature = Q_subsumptive; + else if (EQ (attribute, Q_denotational_from)) + rev_feature = Q_denotational; + + if (CHARP (value)) + ret = value; + else if (CONSP (value)) + { + ret = XCAR (value); + + if (CONSP (ret)) + ret = Fdefine_char (ret); + else if (INTP (ret)) + { + int code_point = XINT (ret); + Emchar cid = DECODE_CHAR (Vcharset_ucs, code_point, 0); + + if (cid >= 0) + ret = make_char (cid); + else + ret = make_char (code_point); + } + } + + if ( !NILP (ret) && !EQ (ret, character) ) + { + Lisp_Object ffv; + + ffv = Fget_char_attribute (ret, rev_feature, Qnil); + if (!CONSP (ffv)) + put_char_attribute (ret, rev_feature, list1 (character)); + else if (NILP (Fmemq (character, ffv))) + put_char_attribute + (ret, rev_feature, + nconc2 (Fcopy_sequence (ffv), list1 (character))); + value = ret; + } + } + else if ( EQ (attribute, Q_subsumptive) || + EQ (attribute, Q_denotational) ) + { + Lisp_Object rest = value; + Lisp_Object ret; + Lisp_Object rev_feature = Qnil; + + if (EQ (attribute, Q_subsumptive)) + rev_feature = Q_subsumptive_from; + else if (EQ (attribute, Q_denotational)) + rev_feature = Q_denotational_from; + + while (CONSP (rest)) + { + ret = XCAR (rest); + + if (CONSP (ret)) + ret = Fdefine_char (ret); + else if (INTP (ret)) + { + int code_point = XINT (ret); + Emchar cid = DECODE_CHAR (Vcharset_ucs, code_point, 0); + + if (cid >= 0) + ret = make_char (cid); + else + ret = make_char (code_point); + } + + if ( !NILP (ret) && !EQ (ret, character) ) + { + put_char_attribute (ret, rev_feature, character); + Fsetcar (rest, ret); + } + rest = XCDR (rest); + } + } + else if ( EQ (attribute, Q_identical) || + EQ (attribute, Q_identical_from) || + EQ (attribute, Q_canonical) || + EQ (attribute, Q_halfwidth_of) || + EQ (attribute, Q_superscript_of) || + EQ (attribute, Q_subscript_of) || + EQ (attribute, Q_circled_of) || + EQ (attribute, Q_component) || + EQ (attribute, Q_component_of) || + ( !EQ (attribute, Q_ucs_unified) + && !NILP (Fstring_match + (build_string ("^\\(<-\\|->\\)[^*]*$"), + Fsymbol_name (attribute), + Qnil, Qnil)) + ) + ) { Lisp_Object rest = value; Lisp_Object ret; @@ -3687,14 +3765,6 @@ Store CHARACTER's ATTRIBUTE with VALUE. rev_feature = Q_identical_from; else if (EQ (attribute, Q_identical_from)) rev_feature = Q_identical; - else if (EQ (attribute, Q_subsumptive)) - rev_feature = Q_subsumptive_from; - else if (EQ (attribute, Q_subsumptive_from)) - rev_feature = Q_subsumptive; - else if (EQ (attribute, Q_denotational)) - rev_feature = Q_denotational_from; - else if (EQ (attribute, Q_denotational_from)) - rev_feature = Q_denotational; else if (EQ (attribute, Q_component)) rev_feature = Q_component_of; else if (EQ (attribute, Q_component_of)) diff --git a/src/chartab.h b/src/chartab.h index a0c5bd6..0a76469 100644 --- a/src/chartab.h +++ b/src/chartab.h @@ -38,7 +38,7 @@ Boston, MA 02111-1307, USA. */ # else /* HAVE_LIBCHISE */ # include "database.h" # endif /* not HAVE_LIBCHISE */ -# define USE_CONCORD_OBJECT_SYSTEM 1 +# /* define USE_CONCORD_OBJECT_SYSTEM 0 */ # define USE_CONCORD_OBJECT_SYSTEM_TO_COMPOSE 1 #endif