- Use `=daikanwa/+p' instead of `morohashi-daikanwa' for M-ddddd'.
[chise/xemacs-chise.git.1] / lisp / utf-2000 / read-maps.el
index 5258505..087bcf6 100644 (file)
@@ -1,6 +1,6 @@
 ;;; read-maps.el --- Read mapping-tables.
 
-;; Copyright (C) 2002,2003,2004,2005 MORIOKA Tomohiko
+;; Copyright (C) 2002,2003,2004,2005,2006,2008,2012 MORIOKA Tomohiko
 
 ;; Author: MORIOKA Tomohiko <tomo@kanji.zinbun.kyoto-u.ac.jp>
 ;; Keywords: mapping table, character, CCS, multiscript, multilingual
@@ -27,7 +27,7 @@
 (defvar mapping-table-ccs-setting-alist
   '((=jis-x0208@1990
      "^J90-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\)" 1 16
-     =ucs@jis
+     =ucs@jis/1990
      "\tJU[+-]\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]+\\)")
     (=jis-x0212
      "^JSP-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\)" 1 16
      "^C5-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\)" 1 16
      =ucs@cns
      "\tCU[+-]\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]+\\)")
+    (=cns11643-6
+     "^C6-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\)" 1 16
+     =ucs@cns
+     "\tCU[+-]\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]+\\)")
+    (=cns11643-7
+     "^C7-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\)" 1 16
+     =ucs@cns
+     "\tCU[+-]\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]+\\)")
     (=big5     
      "^B-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\)" 1 16
      =ucs@big5
      "\tBU[+-]\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]+\\)")
+    (=ks-x1001
+     "^K0-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\)" 1 16
+     =ucs@ks
+     "\tKU[+-]\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]+\\)")
     (=jef-china3     
      "^JC3-\\([0-9A-F][0-9A-F][0-9A-F][0-9A-F]\\)" 1 16
      nil
@@ -149,9 +161,13 @@ UCS-REGEXP is a regular expression to match against
                             (encode-char chr '=ucs@jis/fw 'defined-only))
                            ((eq ucs-ccs '=ucs@gb)
                             (encode-char chr '=ucs@gb/fw 'defined-only))
+                            ;; ((eq ucs-ccs '=ucs@cns)
+                            ;;  (encode-char chr '=ucs@cns/fw 'defined-only))
                             ;; ((eq ucs-ccs '=ucs@big5)
                             ;;  nil)
-                           (t
+                            ;; ((eq ucs-ccs '=ucs@ks)
+                            ;;  (encode-char chr '=ucs@ks/fw 'defined-only))
+                            (t
                             (char-feature chr '=>ucs))))
                          ucs-code)))
            (put-char-attribute chr ucs-ccs ucs-code))
@@ -161,7 +177,9 @@ UCS-REGEXP is a regular expression to match against
                                                            =ucs@jis/1990
                                                             =ucs@jis/2000
                                                            =ucs@gb
+                                                           =ucs@cns
                                                            =ucs@big5
+                                                           =ucs@ks
                                                            )))
                                       (char-feature chr '=>ucs)))
                              ucs)))
@@ -173,6 +191,22 @@ UCS-REGEXP is a regular expression to match against
                (put-char-attribute chr ucs-ccs ucs)))))
        (forward-line)))))
 
+;;;###autoload
+(defun ucs-compat-read-file (filename)
+  (interactive "fUCS-compat file : ")
+  (with-temp-buffer
+    (buffer-disable-undo)
+    (insert-file-contents filename)
+    (goto-char (point-min))
+    (let (ucs ucs*)
+      (while (re-search-forward
+             "^ *U[---+]\\([0-9A-F]+\\)\t *U[---+]\\([0-9A-F]+\\)" nil t)
+       (setq ucs (string-to-int (match-string 1) 16)
+             ucs* (string-to-int (match-string 2) 16))
+       (put-char-attribute (decode-char '=ucs ucs) '=>ucs* ucs*)
+       ))))
+
+;;;###autoload
 (defun jp-jouyou-read-file (filename)
   (interactive "fjp-jouyou file : ")
   (with-temp-buffer