Mercurial > emacs
comparison lisp/language/chinese.el @ 88709:972123cad1be
(post-read-decode-hz)
(pre-write-encode-hz): Moved to china-util.el.
author | Dave Love <fx@gnu.org> |
---|---|
date | Sun, 02 Jun 2002 20:31:23 +0000 |
parents | d1b1b7398049 |
children | 2ea3c1b5c30b |
comparison
equal
deleted
inserted
replaced
88708:0816a10eb8ac | 88709:972123cad1be |
---|---|
94 :pre-write-conversion 'pre-write-encode-hz) | 94 :pre-write-conversion 'pre-write-encode-hz) |
95 | 95 |
96 (define-coding-system-alias 'hz-gb-2312 'chinese-hz) | 96 (define-coding-system-alias 'hz-gb-2312 'chinese-hz) |
97 (define-coding-system-alias 'hz 'chinese-hz) | 97 (define-coding-system-alias 'hz 'chinese-hz) |
98 | 98 |
99 (defun post-read-decode-hz (len) | |
100 (let ((pos (point)) | |
101 (buffer-modified-p (buffer-modified-p)) | |
102 last-coding-system-used) | |
103 (prog1 | |
104 (decode-hz-region pos (+ pos len)) | |
105 (set-buffer-modified-p buffer-modified-p)))) | |
106 | |
107 (defun pre-write-encode-hz (from to) | |
108 (let ((buf (current-buffer))) | |
109 (set-buffer (generate-new-buffer " *temp*")) | |
110 (if (stringp from) | |
111 (insert from) | |
112 (insert-buffer-substring buf from to)) | |
113 (let (last-coding-system-used) | |
114 (encode-hz-region 1 (point-max))) | |
115 nil)) | |
116 | |
117 (set-language-info-alist | 99 (set-language-info-alist |
118 "Chinese-GB" '((charset chinese-gb2312 chinese-sisheng) | 100 "Chinese-GB" '((charset chinese-gb2312 chinese-sisheng) |
119 (coding-system chinese-iso-8bit iso-2022-cn chinese-hz) | 101 (coding-system chinese-iso-8bit iso-2022-cn chinese-hz) |
120 (coding-priority chinese-iso-8bit chinese-big5 iso-2022-cn) | 102 (coding-priority chinese-iso-8bit chinese-big5 iso-2022-cn) |
121 (input-method . "chinese-py-punct") | 103 (input-method . "chinese-py-punct") |
142 "Chinese-BIG5" '((charset chinese-big5-1 chinese-big5-2) | 124 "Chinese-BIG5" '((charset chinese-big5-1 chinese-big5-2) |
143 (coding-system chinese-big5 chinese-iso-7bit) | 125 (coding-system chinese-big5 chinese-iso-7bit) |
144 (coding-priority chinese-big5 iso-2022-cn chinese-iso-8bit) | 126 (coding-priority chinese-big5 iso-2022-cn chinese-iso-8bit) |
145 (input-method . "chinese-py-punct-b5") | 127 (input-method . "chinese-py-punct-b5") |
146 (features china-util) | 128 (features china-util) |
147 (sample-text . "Cantonese ($(0GnM$(B,$(0N]0*Hd(B) $(0*/=((B, $(0+$)p(B") | 129 (sample-text . "Cantonese ($(Gemk#(B,$(Gl]N)fc(B) $ATg3?(B, $ADc:C(B") |
148 (documentation . "Support for Chinese Big5 character set.")) | 130 (documentation . "Support for Chinese Big5 character set.")) |
149 '("Chinese")) | 131 '("Chinese")) |
150 | 132 |
151 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 133 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
152 ;; Chinese CNS11643 (traditional) | 134 ;; Chinese CNS11643 (traditional) |
183 (coding-system iso-2022-cn euc-tw) | 165 (coding-system iso-2022-cn euc-tw) |
184 (coding-priority iso-2022-cn euc-tw chinese-big5 | 166 (coding-priority iso-2022-cn euc-tw chinese-big5 |
185 chinese-iso-8bit) | 167 chinese-iso-8bit) |
186 (features china-util) | 168 (features china-util) |
187 (input-method . "chinese-cns-quick") | 169 (input-method . "chinese-cns-quick") |
170 ;; Fixme: presumably it won't accept big5 now. | |
188 (documentation . "\ | 171 (documentation . "\ |
189 Support for Chinese CNS character sets. Note that EUC-TW coding system | 172 Support for Chinese CNS character sets. Note that EUC-TW coding system |
190 accepts Big5 for input also (which is then converted to CNS).")) | 173 accepts Big5 for input also (which is then converted to CNS).")) |
191 '("Chinese")) | 174 '("Chinese")) |
192 | 175 |