From: tomo Date: Wed, 31 Dec 2003 17:24:41 +0000 (+0000) Subject: (char-ideographic-strokes-from-domains): Add autoload cookie. X-Git-Tag: r21-4-14-chise-0_21-17^2~86 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=3f421116d302cae3444b1883ed38bb2b654d2b90;p=chise%2Fxemacs-chise.git (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. --- 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)