When feature `chise' is not provided, just load up files defined in
authortomo <tomo>
Tue, 12 Mar 2002 05:20:36 +0000 (05:20 +0000)
committertomo <tomo>
Tue, 12 Mar 2002 05:20:36 +0000 (05:20 +0000)
`system-char-db-source-file-list'.
(system-char-database-directory): Don't define it when feature `chise'
is not provided.
(file-name-char-attribute-name): Likewise.
Don't call `reset-char-attribute-table' for files in
`system-char-database-directory' when feature `chise' is not provided.

lisp/utf-2000/update-cdb.el

index 35bdd98..147accd 100644 (file)
@@ -1,9 +1,3 @@
-(defvar system-char-database-directory
-  (expand-file-name "char-db"
-                   (or exec-directory
-                       "../lib-src/")))
-
-
 (defun delete-file-with-children (filename)
   (if (file-directory-p filename)
       (let ((files
        (remove-directory filename))
     (delete-file filename)))
 
-(when (or load-ignore-elc-files
-         (not (file-exists-p system-char-database-directory)))
-  (if (file-exists-p system-char-database-directory)
-      (delete-file-with-children system-char-database-directory))
+(cond
+ ((featurep 'chise)
+  (defvar system-char-database-directory
+    (expand-file-name "char-db"
+                     (or exec-directory
+                         "../lib-src/")))
+
+  (defun file-name-char-attribute-name (filename)
+    (let ((i 0)
+         (base 0)
+         (len (length filename))
+         chr dest)
+      (while (< i len)
+       (if (eq (setq chr (aref filename i)) ?%)
+           (setq dest (concat dest
+                              (substring filename base i)
+                              (char-to-string
+                               (int-char
+                                (string-to-int
+                                 (substring filename (1+ i) (+ i 3)) 16))))
+                 i (+ i 3)
+                 base i)
+         (setq i (1+ i))))
+      (concat dest (substring filename base len))))
+
+  (when (or load-ignore-elc-files
+           (not (file-exists-p system-char-database-directory)))
+    (if (file-exists-p system-char-database-directory)
+       (delete-file-with-children system-char-database-directory))
 
+    (load "dumped-chars.el")
+    (dolist (file system-char-db-source-file-list)
+      (pureload file))
+
+    (dolist (attribute (char-attribute-list))
+      (save-char-attribute-table attribute))
+
+    (dolist (ccs (charset-list))
+      (save-charset-mapping-table ccs)))
+
+  (mapcar (lambda (file)
+           (reset-char-attribute-table
+            (intern (file-name-char-attribute-name file))))
+         (directory-files
+          (expand-file-name "system-char-id"
+                            system-char-database-directory)
+          nil nil t t))
+  )
+ (t
   (load "dumped-chars.el")
   (dolist (file system-char-db-source-file-list)
     (pureload file))
-
-  (dolist (attribute (char-attribute-list))
-    (save-char-attribute-table attribute))
-
-  (dolist (ccs (charset-list))
-    (save-charset-mapping-table ccs)))
-
-(defun file-name-char-attribute-name (filename)
-  (let ((i 0)
-       (base 0)
-       (len (length filename))
-       chr dest)
-    (while (< i len)
-      (if (eq (setq chr (aref filename i)) ?%)
-         (setq dest (concat dest
-                            (substring filename base i)
-                            (char-to-string
-                             (int-char
-                              (string-to-int
-                               (substring filename (1+ i) (+ i 3)) 16))))
-               i (+ i 3)
-               base i)
-       (setq i (1+ i))))
-    (concat dest (substring filename base len))))
-
-(mapcar (lambda (file)
-         (reset-char-attribute-table
-          (intern (file-name-char-attribute-name file))))
-       (directory-files
-        (expand-file-name "system-char-id"
-                          system-char-database-directory)
-        nil nil t t))
+  ))
 
 (garbage-collect)