X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Futf-2000%2Fideograph-util.el;h=18f6f4dccd532f340d4f5aaa6d1ab37c98edd94d;hb=d643edd71fe4ac0dc9bfffc8b7054cae7f61fb49;hp=c00d5bff51a7751c4a2881a7a2b9062e1874174b;hpb=7c46bdba74eeee8d42d4241e988558722c0d4617;p=chise%2Fxemacs-chise.git- diff --git a/lisp/utf-2000/ideograph-util.el b/lisp/utf-2000/ideograph-util.el index c00d5bf..18f6f4d 100644 --- a/lisp/utf-2000/ideograph-util.el +++ b/lisp/utf-2000/ideograph-util.el @@ -1,6 +1,6 @@ ;;; ideograph-util.el --- Ideographic Character Database utility -;; Copyright (C) 1999,2000,2001,2002,2003,2004,2005 MORIOKA Tomohiko. +;; Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2007,2008 MORIOKA Tomohiko. ;; Author: MORIOKA Tomohiko ;; Keywords: CHISE, Chaon model, ISO/IEC 10646, Unicode, UCS-4, MULE. @@ -437,8 +437,8 @@ (or ret (and (setq ret (get-char-attribute char '=>daikanwa)) (if (numberp ret) - (list ret 0) - (append ret '(0)))) + (list ret 0 8) + (append ret '(8)))) (unless (memq char checked) (catch 'tag (let ((rest @@ -482,17 +482,29 @@ (or (encode-char char '=ucs 'defined-only) (char-feature char '=>ucs))) +;;;###autoload (defun char-id (char) (logand (char-int char) #x3FFFFFFF)) +(defun char-ideographic-strokes-diff (char &optional radical) + (if (or (get-char-attribute char '<-subsumptive) + (get-char-attribute char '<-denotational)) + (let (s ds) + (when (and (setq s (char-ideographic-strokes char radical)) + (setq ds (char-daikanwa-strokes char radical))) + (abs (- s ds)))) + 0)) + +;;;###autoload (defun ideograph-char< (a b &optional radical) (let ((ideographic-radical (or radical ideographic-radical))) (char-attributes-poly< a b - '(char-daikanwa-strokes char-daikanwa char-ucs char-id) - '(< morohashi-daikanwa< < <) - '(> > > >)))) + '(char-daikanwa-strokes char-daikanwa char-ucs + char-ideographic-strokes-diff char-id) + '(< morohashi-daikanwa< < < <) + '(> > > > >)))) (defun insert-ideograph-radical-char-data (radical) (let ((chars