annotate lisp/mule/chinese-hooks.el @ 110:fe104dbd9147 r20-1b7

Import from CVS: tag r20-1b7
author cvs
date Mon, 13 Aug 2007 09:19:45 +0200
parents a145efe76779
children cca96a509cfe
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1 ;;; chinese-hooks.el --- pre-loaded support for Chinese.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
2
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
3 ;; Copyright (C) 1992,93,94,95 Free Software Foundation, Inc.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
4 ;; Copyright (C) 1995 Amdahl Corporation.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
5 ;; Copyright (C) 1996 Sun Microsystems.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
6
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
7 ;; This file is part of XEmacs.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
8
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
9 ;; XEmacs is free software; you can redistribute it and/or modify it
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
10 ;; under the terms of the GNU General Public License as published by
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
11 ;; the Free Software Foundation; either version 2, or (at your option)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
12 ;; any later version.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
13
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
14 ;; XEmacs is distributed in the hope that it will be useful, but
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
15 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
17 ;; General Public License for more details.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
18
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
19 ;; You should have received a copy of the GNU General Public License
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
20 ;; along with XEmacs; see the file COPYING. If not, write to the
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
22 ;; Boston, MA 02111-1307, USA.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
23
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
24 ;;; Synched up with: Mule 2.3.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
25
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
26 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
27 ;;; CHINESE
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
28 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
29
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
30 ;; Syntax of Chinese characters.
74
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
31 (modify-syntax-entry 'chinese-gb2312 "w")
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
32 (loop for row in '(33 34 41)
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
33 do (modify-syntax-entry `[chinese-gb2312 ,row] "."))
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
34 ;;(loop for row from 35 to 40
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
35 ;; do (modify-syntax-entry `[chinese-gb2312 ,row] "w"))
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
36 ;;(loop for row from 42 to 126
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
37 ;; do (modify-syntax-entry `[chinese-gb2312 ,row] "w"))
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
38
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
39 (modify-syntax-entry 'chinese-cns11643-1 "w")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
40 (modify-syntax-entry 'chinese-cns11643-2 "w")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
41 (modify-syntax-entry 'chinese-big5-1 "w")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
42 (modify-syntax-entry 'chinese-big5-2 "w")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
43
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
44 ;; CNS11643 Plane3 thru Plane7
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
45 ;; These represent more and more obscure Chinese characters.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
46 ;; By the time you get to Plane 7, we're talking about characters
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
47 ;; that appear once in some ancient manuscript and whose meaning
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
48 ;; is unknown.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
49
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
50 (flet
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
51 ((make-chinese-cns11643-charset
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
52 (name plane final)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
53 (make-charset
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
54 name (concat "Chinese CNS Plane " plane)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
55 `(registry
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
56 ,(concat "CNS11643[.-]\\(.*[.-]\\)?" plane "$")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
57 dimension 2
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
58 chars 94
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
59 final ,final
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
60 graphic 0))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
61 (modify-syntax-entry name "w")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
62 (modify-category-entry name ?t)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
63 ))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
64 (make-chinese-cns11643-charset 'chinese-cns11643-3 "3" ?I)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
65 (make-chinese-cns11643-charset 'chinese-cns11643-4 "4" ?J)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
66 (make-chinese-cns11643-charset 'chinese-cns11643-5 "5" ?K)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
67 (make-chinese-cns11643-charset 'chinese-cns11643-6 "6" ?L)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
68 (make-chinese-cns11643-charset 'chinese-cns11643-7 "7" ?M)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
69 )
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
71 ;; PinYin-ZhuYin
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
72 (make-charset 'sisheng "PinYin-ZhuYin"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
73 '(registry "sisheng_cwnn\\|OMRON_UDC_ZH"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
74 dimension 1
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
75 chars 94
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
76 final ?0
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
77 graphic 0
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
78 ))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
79
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
80 (make-coding-system
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
81 'euc-china 'iso2022
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
82 "Coding-system of Chinese EUC (Extended Unix Code)."
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
83 '(charset-g0 ascii
74
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
84 charset-g1 chinese-gb2312
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
85 charset-g2 sisheng
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
86 charset-g3 t
88
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 74
diff changeset
87 mnemonic "EUC/Zh"
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
88 ))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
89
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
90 (make-coding-system
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
91 'hz 'no-conversion
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
92 "Coding-system of Hz/ZW used for Chinese."
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
93 '(mnemonic "Hz/ZW"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
94 eol-type lf
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
95 post-read-conversion hz2gb-region
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
96 pre-write-conversion gb2hz-region))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
97
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
98 (make-coding-system
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
99 'big5 'big5
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
100 "Coding-system of BIG5."
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
101 '(mnemonic "Big5"))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
102
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
103 (copy-coding-system 'big5 'big5-eten)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
104
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
105 ;; If you prefer QUAIL to EGG, please modify below as you wish.
74
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
106 ;;(when (and (featurep 'egg) (featurep 'wnn))
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
107 ;; (setq wnn-server-type 'cserver)
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
108 ;; (load "its/pinyin")
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
109 ;; (setq its:*standard-modes*
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
110 ;; (cons (its:get-mode-map "PinYin") its:*standard-modes*)))
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
111
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
112 ;; For QUAIL
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
113 ;; Please add your own quail package if any.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
114
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
115 ;; For GB character input
74
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
116 ;;(add-hook 'quail-package-alist '("py" "quail/py"))
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
117 ;;(add-hook 'quail-package-alist '("qj" "quail/qj"))
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
118 ;;(add-hook 'quail-package-alist '("punct" "quail/punct"))
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
119 ;;(add-hook 'quail-package-alist '("sw" "quail/sw"))
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
120 ;;(add-hook 'quail-package-alist '("tonepy" "quail/tonepy"))
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
121 ;;(add-hook 'quail-package-alist '("ccdospy" "quail/ccdospy"))
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
122 ;;(add-hook 'quail-package-alist '("ctlau" "quail/ctlau"))
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
123
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
124 ;; For BIG5 character input
74
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
125 ;;(add-hook 'quail-package-alist '("py-b5" "quail/py-b5"))
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
126 ;;(add-hook 'quail-package-alist '("qj-b5" "quail/qj-b5"))
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
127 ;;(add-hook 'quail-package-alist '("punct-b5" "quail/punct-b5"))
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
128 ;;(add-hook 'quail-package-alist '("ctlaub" "quail/ctlaub"))
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
129 ;;(add-hook 'quail-package-alist '("zozy" "quail/zozy"))
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
130 ;;(add-hook 'quail-package-alist '("etzy" "quail/etzy"))
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
131
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
132 ;; For Big5 handling
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
133
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
134 (define-ccl-program ccl-internal-to-big5-1
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
135 '(((r1 = ((((r0 - #x21) * 94) + r1) - #x21))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
136 (r0 = ((r1 / 157) + #xA1))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
137 (r1 %= 157)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
138 (if (r1 < #x3F) (r1 += #x40) (r1 += #x62))))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
139 "CCL program to convert internal Big5 code (level1) to code point of Big5 font.")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
140
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
141 ;; 6280 is the number of characters that got shoved into `chinese-big5-1'.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
142 (define-ccl-program ccl-internal-to-big5-2
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
143 '(((r1 = (((((r0 - #x21) * 94) + r1) - #x21) + 6280))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
144 (r0 = ((r1 / 157) + #xA1))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
145 (r1 %= 157)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
146 (if (r1 < #x3F) (r1 += #x40) (r1 += #x62))))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
147 "CCL program to convert internal Big5 code (level2) to code point of Big5 font.")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
148
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
149 (set-charset-ccl-program 'chinese-big5-1 ccl-internal-to-big5-1)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
150 (set-charset-ccl-program 'chinese-big5-2 ccl-internal-to-big5-2)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
151
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
152 ;; This isn't used and doesn't work yet because CCL doesn't know
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
153 ;; how to handle things like 'chinese-big5-1 currently. The
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
154 ;; original of this program had 152 (the leading byte) in place of
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
155 ;; chinese-big5-1, etc., but that will never do. No exposing of
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
156 ;; leading bytes to the Lisp level!
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
157 ;(define-ccl-program ccl-big5-to-internal
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
158 ; '(0
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
159 ; ((if (r0 < #xC9)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
160 ; ((r2 = (((r0 - #xA1) * 157) + r1))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
161 ; (r0 = chinese-big5-1))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
162 ; ((r2 = (((r0 - #xC9) * 157) + r1))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
163 ; (r0 = chinese-big5-2)))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
164 ; (if (r1 < #x7F) (r2 -= #x40) (r2 -= #x62))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
165 ; (r1 = ((r2 / 94) + #x21))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
166 ; (r2 = ((r2 % 94) + #x21))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
167 ; ))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
168 ; "CCL program to convert Big5 code to internal code.")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
169
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
170 (define-language-environment 'chinese
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
171 "Chinese (includes GB, Big5, and CNS)"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
172 (lambda ()
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
173 (require 'chinese)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
174 (set-coding-category-system 'iso-8-2 'euc-china)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
175 (set-coding-priority-list '(iso-8-2 big5 iso-8-designate))
88
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 74
diff changeset
176 (set-pathname-coding-system 'euc-china)
110
fe104dbd9147 Import from CVS: tag r20-1b7
cvs
parents: 102
diff changeset
177 (set-default-buffer-file-coding-system 'euc-china) ; GB encoding
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
178 (setq terminal-coding-system 'euc-china)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
179 (setq keyboard-coding-system 'euc-china)
88
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 74
diff changeset
180 (add-hook 'comint-exec-hook
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 74
diff changeset
181 (lambda ()
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 74
diff changeset
182 (let ((proc (get-buffer-process (current-buffer))))
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 74
diff changeset
183 (set-process-input-coding-system proc 'euc-china)
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 74
diff changeset
184 (set-process-output-coding-system proc 'euc-china))))
110
fe104dbd9147 Import from CVS: tag r20-1b7
cvs
parents: 102
diff changeset
185 (set-buffer-file-coding-system-for-read 'autodetect)
fe104dbd9147 Import from CVS: tag r20-1b7
cvs
parents: 102
diff changeset
186 (set-default-buffer-file-coding-system 'euc-china)
88
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 74
diff changeset
187 (setq keyboard-coding-system 'euc-china)
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 74
diff changeset
188 (setq terminal-coding-system 'euc-china)
102
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 88
diff changeset
189 (when (eq 'x (device-type (selected-device)))
a145efe76779 Import from CVS: tag r20-1b3
cvs
parents: 88
diff changeset
190 (x-use-halfwidth-roman-font 'chinese-gb2312 "gb1988"))))
74
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
191 ;; (when (featurep 'egg)
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
192 ;; (setq-default its:*current-map* (its:get-mode-map "PinYin")))
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
193 ;; (setq-default quail-current-package (assoc "py" quail-package-alist))))
88
821dec489c24 Import from CVS: tag r20-0
cvs
parents: 74
diff changeset
194 ;; ))
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
195
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
196 (set-coding-category-system 'big5 'big5)