From: MORIOKA Tomohiko Date: Wed, 21 Oct 2020 01:41:02 +0000 (+0900) Subject: (est-eval-value-as-shuowen-radical): New function. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=c24fc299da6ef6e8b4aa69ea3194d2680cfb991a;p=chise%2Fest.git (est-eval-value-as-shuowen-radical): New function. (est-eval-apply-value): Use `est-eval-value-as-shuowen-radical' for format `shuowen-radical'. (est-eval-unit): Treat `shuowen-radical' in a similar way to `kangxi-radical'. --- diff --git a/est-eval.el b/est-eval.el index d395637..65db614 100644 --- a/est-eval.el +++ b/est-eval.el @@ -426,6 +426,15 @@ (format "%c" (ideographic-radical value))) (est-eval-value-as-S-exp value))) +(defun est-eval-value-as-shuowen-radical (value) + (if (and (integerp value) + (<= 0 value) + (<= value 540)) + (list 'shuowen-radical + nil + (format "%c" (shuowen-radical value))) + (est-eval-value-as-S-exp value))) + (defun daijiten-page-number-to-ndl-950498 (page) (+ (/ page 2) (cond ((< page 229) @@ -820,6 +829,8 @@ (est-eval-value-as-kuten value)) ((eq format 'kangxi-radical) (est-eval-value-as-kangxi-radical value)) + ((eq format 'shuowen-radical) + (est-eval-value-as-shuowen-radical value)) ((eq format 'ids) (est-eval-value-as-ids value)) ((eq format 'decomposition) @@ -912,7 +923,8 @@ ((null exp) "") ((consp exp) (cond - ((memq (car exp) '(value decimal hex HEX ku-ten kangxi-radical + ((memq (car exp) '(value decimal hex HEX ku-ten + kangxi-radical shuowen-radical S-exp string default)) (let ((fn (plist-get (nth 1 exp) :feature)) domain domain-fn ret)