2016-11-21 MORIOKA Tomohiko <tomo.git@chise.org>
+ * ideograph-util.el (char-representative-of-daikanwa): Don't make
+ temporal lists for `<-subsumptive' and `<-denotational'.
+
+2016-11-21 MORIOKA Tomohiko <tomo.git@chise.org>
+
* Ideograph-R009-Man.el (G-IU+202E1): New abstract glyph node to
subsume g2-IU+202E1 and g2-CU+202E1.
2016-11-16 MORIOKA Tomohiko <tomo.git@chise.org>
+ * 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 <tomo.git@chise.org>
+
* 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.
(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)
;;; 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 <tomo@kanji.zinbun.kyoto-u.ac.jp>
;; Keywords: CHISE, Character Database, ISO/IEC 10646, UCS, Unicode, MULE.
(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))))))
;;; 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 <tomo@kanji.zinbun.kyoto-u.ac.jp>
;; Keywords: CHISE, Chaon model, ISO/IEC 10646, Unicode, UCS-4, MULE.
(get-char-attribute chr '<-subsumptive))
(progn
(setq dest nil)
+ (setq ret (list ret))
(dolist (pc ret)
(unless (eq (get-char-attribute
pc 'ideographic-radical)
(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))
(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)))))
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
2016-11-17 MORIOKA Tomohiko <tomo.git@chise.org>
+ * chartab.h: Undefine `USE_CONCORD_OBJECT_SYSTEM' to avoid the
+ Concord Object System.
+
+2016-11-16 MORIOKA Tomohiko <tomo.git@chise.org>
+
+ * 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 <tomo.git@chise.org>
+
* 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.
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;
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))
# 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