Add some CHINA3-JEF code points.
[chise/xemacs-chise.git] / lisp / utf-2000 / char-db-util.el
index 2eeb053..7cd5bf6 100644 (file)
                          (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
          (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)