From: tomo Date: Thu, 5 Feb 2004 12:08:33 +0000 (+0000) Subject: (update-ideograph-radical-table): Support `->denotational'. X-Git-Tag: r21-4-14-chise-0_21-23^2~64 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=facd4a48fd0a1f5f28c825214a973e07a80942a8;p=chise%2Fxemacs-chise.git- (update-ideograph-radical-table): Support `->denotational'. (char-daikanwa): If a character has a mother character, return (NUM 0) instead of NUM. --- diff --git a/lisp/utf-2000/ideograph-util.el b/lisp/utf-2000/ideograph-util.el index 800bb05..cc2a6f1 100644 --- a/lisp/utf-2000/ideograph-util.el +++ b/lisp/utf-2000/ideograph-util.el @@ -156,33 +156,29 @@ (defun update-ideograph-radical-table () (interactive) (let (ret radical script) - (dolist (domain char-db-feature-domains) + (dolist (feature + (cons 'ideographic-radical + (mapcar + (lambda (domain) + (intern (format "%s@%s" 'ideographic-radical domain))) + char-db-feature-domains))) (map-char-attribute - (lambda (char radical) - (when (and radical - (or (null (setq script (get-char-attribute char 'script))) - (memq 'Ideograph script))) - (unless (memq char - (setq ret - (aref ideograph-radical-chars-vector radical))) - (char-ideographic-strokes char) - (aset ideograph-radical-chars-vector radical - (cons char ret)))) + (lambda (chr radical) + (dolist (char (cons chr + (get-char-attribute chr '->denotational))) + (when (and radical + (or (null (setq script + (get-char-attribute char 'script))) + (memq 'Ideograph script))) + (unless (memq char + (setq ret + (aref ideograph-radical-chars-vector + radical))) + (char-ideographic-strokes char) + (aset ideograph-radical-chars-vector radical + (cons char ret))))) nil) - (intern (format "%s@%s" 'ideographic-radical domain)))) - (map-char-attribute - (lambda (char radical) - (when (and radical - (or (null (setq script (get-char-attribute char 'script))) - (memq 'Ideograph script))) - (unless (memq char - (setq ret - (aref ideograph-radical-chars-vector radical))) - (char-ideographic-strokes char) - (aset ideograph-radical-chars-vector radical - (cons char ret)))) - nil) - 'ideographic-radical) + feature)) (map-char-attribute (lambda (char data) (dolist (cell data) @@ -305,7 +301,12 @@ (defun char-daikanwa (char) (or (encode-char char 'ideograph-daikanwa 'defined-only) (encode-char char '=daikanwa-rev2 'defined-only) - (get-char-attribute char '=>daikanwa) + (let ((ret (char-feature char '=>daikanwa))) + (and ret + (if (or (get-char-attribute char '<-unified) + (get-char-attribute char '<-denotational)) + (list ret 0) + ret))) (get-char-attribute char 'morohashi-daikanwa))) ;;;###autoload