(char-db-insert-char-spec): Refer `char-db-ignored-attributes'; add
authortomo <tomo>
Wed, 10 Apr 2002 04:10:00 +0000 (04:10 +0000)
committertomo <tomo>
Wed, 10 Apr 2002 04:10:00 +0000 (04:10 +0000)
`ideographic-structure' into requesting non-CCS attributes if
requesting is nil.
(char-db-ignored-attributes): New variable.
(insert-char-attributes): Refer `char-db-ignored-attributes'.

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

index 392ee1f..55b26b9 100644 (file)
          cal nil)
     (while char-spec
       (setq key (car (car char-spec)))
-      (if (find-charset key)
-         (setq cal (cons key cal))
-       (setq al (cons key al)))
+      (unless (memq key char-db-ignored-attributes)
+       (if (find-charset key)
+           (setq cal (cons key cal))
+         (setq al (cons key al))))
       (setq char-spec (cdr char-spec)))
+    (unless (or cal
+               (memq 'ideographic-structure al))
+      (push 'ideographic-structure al))
     (insert-char-attributes char
                            readable
                            (or al 'none) cal)
 
 (defvar char-db-convert-obsolete-format t)
 
+(defvar char-db-ignored-attributes nil)
+
 (defun insert-char-attributes (char &optional readable
                                    attributes ccs-attributes
                                    column)
     (setq attributes
          (sort (if attributes
                    (if (consp attributes)
-                       (copy-sequence attributes))
+                       (progn
+                         (dolist (name attributes)
+                           (unless (memq name char-db-ignored-attributes)
+                             (push name atr-d)))
+                         atr-d))
                  (dolist (name (char-attribute-list))
-                   (if (find-charset name)
-                       (push name ccs-d)
-                     (push name atr-d)))
+                   (unless (memq name char-db-ignored-attributes)
+                     (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)
+                   (progn
+                     (setq ccs-d nil)
+                     (dolist (name ccs-attributes)
+                       (unless (memq name char-db-ignored-attributes)
+                         (push name ccs-d)))
+                     ccs-d)
                  (or ccs-d
-                     (charset-list)))
+                     (progn
+                       (dolist (name (charset-list))
+                         (unless (memq name char-db-ignored-attributes)
+                           (push name ccs-d)))
+                       ccs-d)))
                #'char-attribute-name<)))
   (unless column
     (setq column (current-column)))