(char-id): Add autoload cookie.
authortomo <tomo>
Thu, 2 Oct 2008 14:00:23 +0000 (14:00 +0000)
committertomo <tomo>
Thu, 2 Oct 2008 14:00:23 +0000 (14:00 +0000)
(char-ideographic-strokes-diff): New function.
(ideograph-char<): Add autoload cookie; use
`char-ideographic-strokes-diff'.

lisp/utf-2000/ideograph-util.el

index 8d0a901..18f6f4d 100644 (file)
@@ -1,6 +1,6 @@
 ;;; ideograph-util.el --- Ideographic Character Database utility
 
-;; Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2007 MORIOKA Tomohiko.
+;; Copyright (C) 1999,2000,2001,2002,2003,2004,2005,2007,2008 MORIOKA Tomohiko.
 
 ;; Author: MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
 ;; Keywords: CHISE, Chaon model, ISO/IEC 10646, Unicode, UCS-4, MULE.
   (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