(M38722): Separate U+8FC2.
[chise/xemacs-chise.git-] / lisp / utf-2000 / ideograph-util.el
index 2b8d259..b051ead 100644 (file)
@@ -61,6 +61,8 @@
                    japanese-jisx0208
                    japanese-jisx0208-1990
                    japanese-jisx0212
+                   japanese-jisx0213-1
+                   japanese-jisx0213-2
                    chinese-cns11643-1
                    chinese-cns11643-2
                    chinese-cns11643-3
                 nil)
                (t (< (car (cdr ra))(car (cdr rb))))))
         (t (< (car ra)(car rb)))))
-       ((setq ra (get-char-attribute a 'ucs))
-       (cond
-        ((setq rb (get-char-attribute b 'ucs))
-         (< ra rb))))
-       (t
-       (cond
-        ((setq ra (char-ideograph-strokes a))
-         (cond ((setq rb (char-ideograph-strokes b))
-                (cond ((= ra rb)
-                       (not (char-ideograph-strokes b)))
-                      ((< ra rb))))))
-        )))))))
+       (t)))
+     ((or (get-char-attribute b 'morohashi-daikanwa)
+         (get-char-attribute b 'non-morohashi))
+      nil)
+     ((setq ra (get-char-attribute a 'ucs))
+      (cond
+       ((setq rb (get-char-attribute b 'ucs))
+       (< ra rb))))
+     (t
+      (cond
+       ((setq ra (char-ideograph-strokes a))
+       (cond ((setq rb (char-ideograph-strokes b))
+              (cond ((= ra rb)
+                     (not (char-ideograph-strokes b)))
+                    ((< ra rb))))))
+       )))))
 
 (defun insert-ideograph-radical-char-data (radical)
   (let ((chars
       (let ((name (get-char-attribute (int-char (+ #x2EFF radical)) 'name)))
        (if (string-match "KANGXI RADICAL " name)
            (setq name (capitalize (substring name (match-end 0)))))
+       (setq name (mapconcat (lambda (char)
+                               (if (eq char ? )
+                                   "-"
+                                 (char-to-string char))) name ""))
        (setq file
              (expand-file-name
               (format "Ideograph-R%03d-%s.el" radical name)
               file))))
   (with-temp-buffer
     (insert-ideograph-radical-char-data radical)
-    (write-region (point-min)(point-max) file)))
+    (char-db-update-comment)
+    (let ((coding-system-for-write 'utf-8))
+      (write-region (point-min)(point-max) file)
+      )))
 
 (provide 'ideograph-util)