X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Futf-2000%2Fupdate-cdb.el;h=8ee1852b0ecef116c54c27359ad0d141f3122af2;hb=172ae2bab658f5d53220d8594904771e4a81a7dd;hp=efae3578a82a370b70d56ca7b0cea68dd04471d0;hpb=a5812bf2ff9a9cf40f4ff78dcb83f5b4c295bd18;p=chise%2Fxemacs-chise.git.1 diff --git a/lisp/utf-2000/update-cdb.el b/lisp/utf-2000/update-cdb.el index efae357..8ee1852 100644 --- a/lisp/utf-2000/update-cdb.el +++ b/lisp/utf-2000/update-cdb.el @@ -1,24 +1,24 @@ ;;; update-cdb.el --- Update and/or setup character attribute database -;; Copyright (C) 2002 MORIOKA Tomohiko. +;; Copyright (C) 2002,2003,2004 MORIOKA Tomohiko. ;; Author: MORIOKA Tomohiko -;; Keywords: Character, Database, UTF-2000, Unicode, UCS-4, MULE. +;; Keywords: Character, Database, CHISE, Unicode, UCS-4, MULE. -;; This file is part of XEmacs UTF-2000. +;; This file is part of XEmacs CHISE. -;; XEmacs UTF-2000 is free software; you can redistribute it and/or +;; XEmacs CHISE is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as ;; published by the Free Software Foundation; either version 2, or (at ;; your option) any later version. -;; XEmacs UTF-2000 is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; XEmacs CHISE is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;; You should have received a copy of the GNU General Public License -;; along with XEmacs UTF-2000; see the file COPYING. If not, write to +;; along with XEmacs CHISE; see the file COPYING. If not, write to ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. @@ -37,9 +37,9 @@ (cond ((featurep 'chise) (defvar system-char-database-directory - (expand-file-name "char-db" - (or exec-directory - "../lib-src/"))) + (expand-file-name "chise-db" + (or data-directory + "../etc/"))) (defun file-name-char-attribute-name (filename) (let ((i 0) @@ -73,18 +73,31 @@ (save-char-attribute-table attribute)) (dolist (ccs (charset-list)) + (and (fboundp 'save-charset-properties) + (save-charset-properties ccs)) (save-charset-mapping-table ccs)) + + (with-temp-buffer + (insert + (format + "(setq next-defined-char-id #x%X)\n" + next-defined-char-id)) + (write-region (point-min)(point-max) + "../lisp/utf-2000/cid-conf.el")) ) (t - (mapcar (lambda (file) - (mount-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)) + (if (>= (function-max-args 'char-attribute-list) 1) + (char-attribute-list 'rehash) + (mapcar (lambda (file) + (mount-char-attribute-table + (intern (file-name-char-attribute-name file)))) + (directory-files + (expand-file-name "system-char-id" ; "character/feature" + system-char-database-directory) + nil nil t t))) (dolist (ccs (charset-list)) (reset-charset-mapping-table ccs)) + (load "../lisp/utf-2000/cid-conf.el") ))) (t (load "dumped-chars.el")