(char-db-coded-charset-priority-list): Ignore `mojikyo-pj-*'.
[chise/xemacs-chise.git-] / lisp / utf-2000 / char-db-util.el
index 2eeb053..687b430 100644 (file)
                       arabic-digit
                       arabic-1-column
                       arabic-2-column)))
+             ((string-match "^mojikyo-pj-" (symbol-name (car rest))))
              ((string-match "^ideograph-gt-pj-" (symbol-name (car rest)))
               (unless (memq 'ideograph-gt dest)
                 (setq dest (cons 'ideograph-gt dest))))
                          (split-char char)))
                  (setq char-spec (list ret))
                  (dolist (ccs (delq (car ret) (charset-list)))
-                   (if (or (and (>= (charset-iso-final-char ccs) ?0)
+                   (if (or (and (charset-iso-final-char ccs)
                                 (setq ret (get-char-attribute char ccs)))
                            (eq ccs 'ideograph-daikanwa))
                        (setq char-spec (cons (cons ccs ret) char-spec))))
 (defun insert-char-attributes (char &optional readable
                                    attributes ccs-attributes
                                    column)
-  (setq attributes
-       (sort (if attributes
-                 (if (consp attributes)
-                     (copy-sequence attributes))
-               (char-attribute-list))
-             #'char-attribute-name<))
-  (setq ccs-attributes
-       (sort (if ccs-attributes
-                 (copy-sequence ccs-attributes)
-               (charset-list))
-             #'char-attribute-name<))
+  (let (atr-d ccs-d)
+    (setq attributes
+         (sort (if attributes
+                   (if (consp attributes)
+                       (copy-sequence attributes))
+                 (dolist (name (char-attribute-list))
+                   (if (find-charset name)
+                       (push name ccs-d)
+                     (push name atr-d)))
+                 atr-d)
+               #'char-attribute-name<))
+    (setq ccs-attributes
+         (sort (if ccs-attributes
+                   (copy-sequence ccs-attributes)
+                 (or ccs-d
+                     (charset-list)))
+               #'char-attribute-name<)))
   (unless column
     (setq column (current-column)))
   (let (name value has-long-ccs-name rest
                      line-breaking))
       (setq attributes (delq '=>ucs* attributes))
       )
+    (when (and (memq '=>ucs-jis attributes)
+              (setq value (get-char-attribute char '=>ucs-jis)))
+      (insert (format "(=>ucs-jis\t\t. #x%04X)\t; %c%s"
+                     value (decode-char 'ucs value)
+                     line-breaking))
+      (setq attributes (delq '=>ucs-jis attributes))
+      )
     (when (and (memq '->ucs attributes)
               (setq value (get-char-attribute char '->ucs)))
       (insert (format (if char-db-convert-obsolete-format
               (setq value (get-char-attribute char name)))
          (insert
           (format
-           (cond ((memq name '(ideograph-daikanwa ideograph-gt
-                                                  ideograph-cbeta))
+           (cond ((memq name '(ideograph-daikanwa-2
+                               ideograph-daikanwa
+                               ideograph-gt
+                               ideograph-cbeta))
                   (if has-long-ccs-name
                       "(%-26s . %05d)\t; %c%s"
                     "(%-18s . %05d)\t; %c%s"))
          (insert-char-data-with-variant char 'printable)
          (unless (char-attribute-alist char)
            (insert (format ";; = %c\n"
-                           (apply #'make-char (split-char char)))))
+                           (let* ((rest (split-char char))
+                                  (ccs (pop rest))
+                                  (code (pop rest)))
+                             (while rest
+                               (setq code (logior (lsh code 8)
+                                                  (pop rest))))
+                             (decode-char ccs code)))))
           ;; (char-db-update-comment)
          (set-buffer-modified-p nil)
          (view-mode the-buf (lambda (buf)