From: MORIOKA Tomohiko Date: Thu, 1 Jul 2021 12:13:57 +0000 (+0900) Subject: (ids-update-index): Support `ideographic-structure@apparent/leftmost'. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=13bd93fd6184c7c9955b683b5616d1b96493e2e1;p=chise%2Fids.git (ids-update-index): Support `ideographic-structure@apparent/leftmost'. (ideographic-structure-find-chars): Likewise. (ideographic-structure-compare-functional-and-apparent): Refer `ideographic-structure@apparent/leftmost'. --- diff --git a/ids-find.el b/ids-find.el index be0c66e..8fe8df7 100644 --- a/ids-find.el +++ b/ids-find.el @@ -60,6 +60,11 @@ (ids-index-store-structure c v) nil) 'ideographic-structure@apparent) + (map-char-attribute + (lambda (c v) + (ids-index-store-structure c v) + nil) + 'ideographic-structure@apparent/leftmost) (unless in-memory (save-char-attribute-table 'ideographic-products))) @@ -572,6 +577,9 @@ (ideographic-structure-equal str structure)) (and (setq str (get-char-attribute pc 'ideographic-structure@apparent)) + (ideographic-structure-equal str structure)) + (and (setq str + (get-char-attribute pc 'ideographic-structure@apparent/leftmost)) (ideographic-structure-equal str structure))) (setq pl (cons pc pl)) )) @@ -1603,11 +1611,13 @@ COMPONENT can be a character or char-spec." (when (setq enc-str (cond ((characterp enc) (or (get-char-attribute enc 'ideographic-structure) - (get-char-attribute enc 'ideographic-structure@apparent)) + (get-char-attribute enc 'ideographic-structure@apparent) + (get-char-attribute enc 'ideographic-structure@apparent/leftmost)) ) ((consp enc) (or (cdr (assq 'ideographic-structure enc)) - (cdr (assq 'ideographic-structure@apparent enc))) + (cdr (assq 'ideographic-structure@apparent enc)) + (cdr (assq 'ideographic-structure@apparent/leftmost enc))) ))) ;; (setq enc-str ;; (mapcar (lambda (cell)