(insert-char-attributes): Now return value of `char-attribute-list'
authortomo <tomo>
Tue, 20 Nov 2001 17:21:24 +0000 (17:21 +0000)
committertomo <tomo>
Tue, 20 Nov 2001 17:21:24 +0000 (17:21 +0000)
includes names of CCS-attributes.

lisp/utf-2000/char-db-util.el

index bc8e6a5..50996cb 100644 (file)
 (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