From 3f421116d302cae3444b1883ed38bb2b654d2b90 Mon Sep 17 00:00:00 2001 From: tomo Date: Wed, 31 Dec 2003 17:24:41 +0000 Subject: [PATCH] (char-ideographic-strokes-from-domains): Add autoload cookie. (char-ideographic-strokes): Add autoload cookie. (char-total-strokes-from-domains): New function. (char-total-strokes): New function. --- lisp/utf-2000/ideograph-util.el | 55 +++++++++++++++++++++++++++------------ 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/lisp/utf-2000/ideograph-util.el b/lisp/utf-2000/ideograph-util.el index eafb64a..a5c9702 100644 --- a/lisp/utf-2000/ideograph-util.el +++ b/lisp/utf-2000/ideograph-util.el @@ -85,25 +85,28 @@ 11 12 12 12 12 13 13 13 13 14 14 15 16 16 17]) +;;;###autoload (defun char-ideographic-strokes-from-domains (char domains &optional radical) - (catch 'tag - (dolist (domain domains) - (if (and (setq ret (or (get-char-attribute - char - (intern - (format "%s@%s" - 'ideographic-radical domain))) - (get-char-attribute - char 'ideographic-radical))) - (or (eq ret radical) - (null radical)) - (setq ret (get-char-attribute - char - (intern - (format "%s@%s" - 'ideographic-strokes domain))))) - (throw 'tag ret))))) + (let (ret) + (catch 'tag + (dolist (domain domains) + (if (and (setq ret (or (get-char-attribute + char + (intern + (format "%s@%s" + 'ideographic-radical domain))) + (get-char-attribute + char 'ideographic-radical))) + (or (eq ret radical) + (null radical)) + (setq ret (get-char-attribute + char + (intern + (format "%s@%s" + 'ideographic-strokes domain))))) + (throw 'tag ret)))))) +;;;###autoload (defun char-ideographic-strokes (char &optional radical preferred-domains) (let (ret) (or (char-ideographic-strokes-from-domains @@ -132,6 +135,24 @@ strokes))))) ;;;###autoload +(defun char-total-strokes-from-domains (char domains) + (let (ret) + (catch 'tag + (dolist (domain domains) + (if (setq ret (get-char-attribute + char + (intern + (format "%s@%s" + 'total-strokes domain)))) + (throw 'tag ret)))))) + +;;;###autoload +(defun char-total-strokes (char &optional preferred-domains) + (or (char-total-strokes-from-domains char preferred-domains) + (get-char-attribute char 'total-strokes) + (char-total-strokes-from-domains char char-db-feature-domains))) + +;;;###autoload (defun update-ideograph-radical-table () (interactive) (let (ret radical script) -- 1.7.10.4