Don't add `=gt-pj-1' features into some JIS X 0208:1990 code points.
[chise/xemacs-chise.git.1] / lisp / utf-2000 / maps-conf.el
1 (require 'read-maps)
2
3 (dolist (file '("J90-to-UCS.txt" "JSP-to-UCS.txt"
4                 "JX1-to-UCS.txt" "JX2-to-UCS.txt"
5                 "C3-to-UCS.txt" "C4-to-UCS.txt"
6                 "B-to-UCS.txt" "JC3-to-UCS.txt"))
7   (mapping-table-read-file (expand-file-name file "../etc/char-data/")))
8
9
10 (let ((ucs #xE000)
11       big5 chr
12       ret)
13   (while (<= ucs #xF848)
14     (setq chr (decode-char 'ucs ucs))
15     (when (setq big5 (get-char-attribute chr '=big5-pua))
16       (when (setq chr (decode-char '=big5-cdp big5))
17         (unless (get-char-attribute chr '=big5-cdp)
18           (put-char-attribute chr '=big5-cdp big5))))
19     (setq ucs (1+ ucs))))
20
21
22 (map-char-attribute
23  (lambda (c v)
24    (unless (memq v '(#x5C37 #x5C52 #x3521 #x5D62 #x5F4A
25                      #x5F5B #x6062 #x4849 #x6173 #x306B
26                      #x6328 #x6352 #x6362))
27      (put-char-attribute (decode-char 'japanese-jisx0208-1990 v)
28                          '=gt-pj-1 v))
29    nil)
30  '=gt-pj-1)
31
32 (let ((default-coded-charset-priority-list
33         '(=gt-pj-1
34           =gt-pj-2
35           =gt-pj-3
36           =gt-pj-4
37           =gt-pj-5
38           =gt-pj-6
39           =gt-pj-7
40           =gt-pj-8
41           =gt-pj-9
42           =gt-pj-10
43           =gt-pj-11
44           =gt-pj-k1
45           =gt-pj-k2))
46       (i 1)
47       chr ret)
48   (while (<= i 12000)
49     (when (and (setq ret (decode-char '=gt-k i))
50                (setq ret (split-char ret))
51                (memq (car ret) default-coded-charset-priority-list))
52       (when (setq chr (apply (function make-char) ret))
53         (put-char-attribute chr '=gt-k i)))
54     (setq i (1+ i))))
55
56 (let (gt)
57   (dolist (ccs '(=gt-pj-1
58                  =gt-pj-2
59                  =gt-pj-3
60                  =gt-pj-4
61                  =gt-pj-5
62                  =gt-pj-6
63                  =gt-pj-7
64                  =gt-pj-8
65                  =gt-pj-9
66                  =gt-pj-10
67                  =gt-pj-11))
68     (map-char-attribute
69      (lambda (c v)
70        (when (setq gt (encode-char c '=gt))
71          (put-char-attribute c '=gt gt)
72          (put-char-attribute (decode-char ccs v) '=gt gt))
73        nil)
74      ccs)))