;;; ideograph-util.el --- Ideographic Character Database utility
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008,
-;; 2009, 2010, 2012 MORIOKA Tomohiko.
+;; 2009, 2010, 2012, 2014, 2015 MORIOKA Tomohiko.
;; Author: MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
;; Keywords: CHISE, Chaon model, ISO/IEC 10646, Unicode, UCS-4, MULE.
testers (cdr testers)
defaulters (cdr defaulters))))))
+(defun char-daikanwa-radical (char &optional radical ignore-sisters)
+ (or (and (encode-char char '=daikanwa@rev2 'defined-only)
+ (or (get-char-attribute char 'ideographic-radical@daikanwa)
+ (get-char-attribute char 'ideographic-radical)))
+ (char-ideographic-radical char radical ignore-sisters)))
+
(defun char-daikanwa-strokes (char &optional radical)
(unless radical
(setq radical ideographic-radical))
(setq radical ideographic-radical))
(if (or (null radical)
(eq (or (get-char-attribute char 'ideographic-radical)
- (char-ideographic-radical char radical t))
+ (char-daikanwa-radical char radical t))
radical))
(let ((ret (or (encode-char char '=daikanwa@rev2 'defined-only)
;; (encode-char char '=daikanwa 'defined-only)
(setq depth 0))
(catch 'tag
(let ((rest
- (append (get-char-attribute char '->subsumptive)
- (get-char-attribute char '->denotational)))
+ (append
+ (get-char-attribute char '->subsumptive)
+ (get-char-attribute char '->denotational)
+ (get-char-attribute char '->denotational@component)
+ ))
(i 0)
sc lnum)
(setq checked (cons char checked))
(setq checked (cons sc checked)
rest (cdr rest)))
(setq rest
- (append (get-char-attribute char '<-subsumptive)
- (get-char-attribute char '<-denotational)))
+ (append
+ (get-char-attribute char '<-subsumptive)
+ (get-char-attribute char '<-denotational)
+ (get-char-attribute char '<-denotational@component)
+ ))
(while rest
(setq sc (car rest))
(when (setq ret (char-daikanwa sc radical checked depth))