diff options
| author | Kenichi Handa | 1997-02-26 12:24:02 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1997-02-26 12:24:02 +0000 |
| commit | f3f181230a977922a7a6ff58c4766b8cfd19839c (patch) | |
| tree | 026ad26e5c9f339968778f0765e38b677d1c63f8 | |
| parent | d92d01280179237ea7237163eba527bcd0d19266 (diff) | |
| download | emacs-f3f181230a977922a7a6ff58c4766b8cfd19839c.tar.gz emacs-f3f181230a977922a7a6ff58c4766b8cfd19839c.zip | |
Add INIT-BOL to coding system iso-2022-cn.
Remove prefix "coding-system-" from coding system symbol names.
| -rw-r--r-- | lisp/language/chinese.el | 91 |
1 files changed, 55 insertions, 36 deletions
diff --git a/lisp/language/chinese.el b/lisp/language/chinese.el index 66d12219fbf..aa3ddcf4d88 100644 --- a/lisp/language/chinese.el +++ b/lisp/language/chinese.el | |||
| @@ -34,31 +34,44 @@ | |||
| 34 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 34 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 35 | 35 | ||
| 36 | (make-coding-system | 36 | (make-coding-system |
| 37 | 'coding-system-iso-2022-cn 2 ?C | 37 | 'iso-2022-cn 2 ?C |
| 38 | "Coding system ISO-2022-CN for Chinese (GB and CNS character sets)." | 38 | "Coding system ISO-2022-CN for Chinese (GB and CNS character sets)." |
| 39 | '(ascii | 39 | '(ascii |
| 40 | (nil chinese-gb2312 chinese-cns11643-1) | 40 | (nil chinese-gb2312 chinese-cns11643-1) |
| 41 | (nil chinese-cns11643-2) | 41 | (nil chinese-cns11643-2) |
| 42 | (nil chinese-cns11643-3 chinese-cns11643-4 chinese-cns11643-5 | 42 | (nil chinese-cns11643-3 chinese-cns11643-4 chinese-cns11643-5 |
| 43 | chinese-cns11643-6 chinese-cns11643-7) | 43 | chinese-cns11643-6 chinese-cns11643-7) |
| 44 | nil ascii-eol ascii-cntl seven locking-shift single-shift)) | 44 | nil ascii-eol ascii-cntl seven locking-shift single-shift nil nil nil |
| 45 | init-bol)) | ||
| 46 | |||
| 47 | (define-coding-system-alias 'iso-2022-cn 'iso-2022-cn-ext) | ||
| 48 | |||
| 49 | (set-language-info | ||
| 50 | "Chinese" 'documentation | ||
| 51 | "Emacs provides three kinds of Chinese support: Chinese-GB, | ||
| 52 | Chinese-BIG5, and Chinese-CNS. Please specify one of them to get more | ||
| 53 | information.") | ||
| 45 | 54 | ||
| 46 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 55 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 47 | ;;; Chinese GB2312 (simplified) | 56 | ;;; Chinese GB2312 (simplified) |
| 48 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 57 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 49 | 58 | ||
| 50 | (make-coding-system | 59 | (make-coding-system |
| 51 | 'coding-system-euc-china 2 ?C | 60 | 'cn-gb-2312 2 ?C |
| 52 | "Coding-system of Chinese EUC (so called GB Encoding)." | 61 | "Coding-system of Chinese EUC (so called GB Encoding)." |
| 53 | '((ascii t) chinese-gb2312 chinese-sisheng nil | 62 | '((ascii t) chinese-gb2312 chinese-sisheng nil |
| 54 | nil ascii-eol ascii-cntl nil nil single-shift nil)) | 63 | nil ascii-eol ascii-cntl nil nil single-shift nil)) |
| 55 | 64 | ||
| 65 | (define-coding-system-alias 'cn-gb-2312 'euc-china) | ||
| 66 | |||
| 56 | (make-coding-system | 67 | (make-coding-system |
| 57 | 'coding-system-hz 0 ?z | 68 | 'hz-gb-2312 0 ?z |
| 58 | "Codins-system of Hz/ZW used for Chinese (GB)." | 69 | "Codins-system of Hz/ZW used for Chinese (GB)." |
| 59 | nil) | 70 | nil) |
| 60 | (put 'coding-system-hz 'post-read-conversion 'post-read-decode-hz) | 71 | (put 'hz-gb-2312 'post-read-conversion 'post-read-decode-hz) |
| 61 | (put 'coding-system-hz 'pre-write-conversion 'pre-write-encode-hz) | 72 | (put 'hz-gb-2312 'pre-write-conversion 'pre-write-encode-hz) |
| 73 | |||
| 74 | (define-coding-system-alias 'hz-gb-2312 'hz) | ||
| 62 | 75 | ||
| 63 | (defun post-read-decode-hz (len) | 76 | (defun post-read-decode-hz (len) |
| 64 | (let ((pos (point))) | 77 | (let ((pos (point))) |
| @@ -75,6 +88,8 @@ | |||
| 75 | nil)) | 88 | nil)) |
| 76 | 89 | ||
| 77 | (register-input-method | 90 | (register-input-method |
| 91 | "Chinese-GB" '("cxterm-gb" encoded-kbd-select-terminal cn-gb-2312)) | ||
| 92 | (register-input-method | ||
| 78 | "Chinese-GB" '("quail-ccdospy" quail-use-package "quail/ccdospy")) | 93 | "Chinese-GB" '("quail-ccdospy" quail-use-package "quail/ccdospy")) |
| 79 | (register-input-method | 94 | (register-input-method |
| 80 | "Chinese-GB" '("quail-ctlau" quail-use-package "quail/ctlau")) | 95 | "Chinese-GB" '("quail-ctlau" quail-use-package "quail/ctlau")) |
| @@ -94,8 +109,9 @@ | |||
| 94 | (defun setup-chinese-gb-environment () | 109 | (defun setup-chinese-gb-environment () |
| 95 | (setq primary-language "Chinese-GB") | 110 | (setq primary-language "Chinese-GB") |
| 96 | 111 | ||
| 97 | (setq coding-category-iso-8-2 'coding-system-euc-china) | 112 | (setq coding-category-iso-8-2 'cn-gb-2312) |
| 98 | (setq coding-category-iso-else 'coding-system-iso-2022-cn) | 113 | (setq coding-category-iso-else 'iso-2022-cn) |
| 114 | (setq coding-category-big5 'cn-big5) | ||
| 99 | 115 | ||
| 100 | (set-coding-priority | 116 | (set-coding-priority |
| 101 | '(coding-category-iso-7 | 117 | '(coding-category-iso-7 |
| @@ -106,34 +122,31 @@ | |||
| 106 | coding-category-internal | 122 | coding-category-internal |
| 107 | )) | 123 | )) |
| 108 | 124 | ||
| 109 | (setq-default buffer-file-coding-system 'coding-system-euc-china) | 125 | (setq-default buffer-file-coding-system 'cn-gb-2312) |
| 110 | (set-terminal-coding-system 'coding-system-euc-china) | 126 | (set-terminal-coding-system 'cn-gb-2312) |
| 111 | (set-keyboard-coding-system 'coding-system-euc-china) | 127 | (set-keyboard-coding-system 'cn-gb-2312) |
| 112 | 128 | ||
| 113 | (setq default-input-method '("Chinese-GB" . "quail-py")) | 129 | (setq default-input-method '("Chinese-GB" . "quail-py")) |
| 114 | ) | 130 | ) |
| 115 | 131 | ||
| 116 | (set-language-info-alist | 132 | (set-language-info-alist |
| 117 | "Chinese" '((documentation . | 133 | "Chinese-GB" '((documentation . t) |
| 118 | "Emacs provides three kinds of Chinese support: Chinese-GB, | 134 | (setup-function . setup-chinese-gb-environment) |
| 119 | Chinese-BIG5, and Chinese-CNS. Please specify one of them to get more | 135 | (charset . (chinese-gb2312 chinese-sisheng)) |
| 120 | information.") | 136 | (coding-system . (cn-gb-2312 hz-gb-2312 iso-2022-cn)) |
| 121 | (setup-function . setup-chinese-gb-environment) | 137 | (documentation . t) |
| 122 | (charset . (chinese-gb2312 chinese-sisheng)) | 138 | (sample-text . "Chinese ($AVPND(B,$AFUM(;0(B,$A::So(B) $ADc:C(B"))) |
| 123 | (coding-system . (coding-system-euc-china | ||
| 124 | coding-system-hz | ||
| 125 | coding-system-iso-2022-cn)) | ||
| 126 | (documentation . t) | ||
| 127 | (sample-text . "Chinese ($AVPND(B,$AFUM(;0(B,$A::So(B) $ADc:C(B"))) | ||
| 128 | 139 | ||
| 129 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 140 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 130 | ;; Chinese BIG5 (traditional) | 141 | ;; Chinese BIG5 (traditional) |
| 131 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 142 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 132 | 143 | ||
| 133 | (make-coding-system | 144 | (make-coding-system |
| 134 | 'coding-system-big5 3 ?B | 145 | 'big5 3 ?B |
| 135 | "Coding-system of BIG5.") | 146 | "Coding-system of BIG5.") |
| 136 | 147 | ||
| 148 | (define-coding-system-alias 'big5 'cn-big5) | ||
| 149 | |||
| 137 | ;; Big5 font requires special encoding. | 150 | ;; Big5 font requires special encoding. |
| 138 | (define-ccl-program ccl-encode-big5-font | 151 | (define-ccl-program ccl-encode-big5-font |
| 139 | `(0 | 152 | `(0 |
| @@ -153,6 +166,8 @@ information.") | |||
| 153 | (cons (cons "big5" ccl-encode-big5-font) font-ccl-encoder-alist)) | 166 | (cons (cons "big5" ccl-encode-big5-font) font-ccl-encoder-alist)) |
| 154 | 167 | ||
| 155 | (register-input-method | 168 | (register-input-method |
| 169 | "Chinese-BIG5" '("cxterm-big5" encoded-kbd-select-terminal big5)) | ||
| 170 | (register-input-method | ||
| 156 | "Chinese-BIG5" '("quail-qj-b5" quail-use-package "quail/qj-b5")) | 171 | "Chinese-BIG5" '("quail-qj-b5" quail-use-package "quail/qj-b5")) |
| 157 | (register-input-method | 172 | (register-input-method |
| 158 | "Chinese-BIG5" '("quail-zozy" quail-use-package "quail/zozy")) | 173 | "Chinese-BIG5" '("quail-zozy" quail-use-package "quail/zozy")) |
| @@ -176,17 +191,19 @@ information.") | |||
| 176 | (defun setup-chinese-big5-environment () | 191 | (defun setup-chinese-big5-environment () |
| 177 | (setq primary-language "Chinese-BIG5") | 192 | (setq primary-language "Chinese-BIG5") |
| 178 | 193 | ||
| 179 | (setq coding-category-big5 'coding-system-big5) | 194 | (setq coding-category-big5 'cn-big5) |
| 180 | (setq coding-category-iso-else 'coding-system-iso-2022-cn) | 195 | (setq coding-category-iso-else 'iso-2022-cn) |
| 196 | (setq coding-category-iso-8-2 'cn-gb-2312) | ||
| 181 | 197 | ||
| 182 | (set-coding-priority | 198 | (set-coding-priority |
| 183 | '(coding-category-iso-7 | 199 | '(coding-category-iso-7 |
| 184 | coding-category-iso-else | 200 | coding-category-iso-else |
| 185 | coding-category-big5)) | 201 | coding-category-big5 |
| 202 | coding-category-iso-8-2)) | ||
| 186 | 203 | ||
| 187 | (setq-default buffer-file-coding-system 'coding-system-big5) | 204 | (setq-default buffer-file-coding-system 'cn-big5) |
| 188 | (set-terminal-coding-system 'coding-system-big5) | 205 | (set-terminal-coding-system 'cn-big5) |
| 189 | (set-keyboard-coding-system 'coding-system-big5) | 206 | (set-keyboard-coding-system 'cn-big5) |
| 190 | 207 | ||
| 191 | (setq default-input-method '("Chinese-BIG5" . "quail-py-b5")) | 208 | (setq default-input-method '("Chinese-BIG5" . "quail-py-b5")) |
| 192 | ) | 209 | ) |
| @@ -194,8 +211,7 @@ information.") | |||
| 194 | (set-language-info-alist | 211 | (set-language-info-alist |
| 195 | "Chinese-BIG5" '((setup-function . setup-chinese-big5-environment) | 212 | "Chinese-BIG5" '((setup-function . setup-chinese-big5-environment) |
| 196 | (charset . (chinese-big5-1 chinese-big5-2)) | 213 | (charset . (chinese-big5-1 chinese-big5-2)) |
| 197 | (coding-system . (coding-system-big5 | 214 | (coding-system . (cn-big5 iso-2022-cn)) |
| 198 | coding-system-iso-2022-cn)) | ||
| 199 | (documentation . t) | 215 | (documentation . t) |
| 200 | (sample-text . "Cantonese ($(0GnM$(B,$(0N]0*Hd(B) $(0*/=((B, $(0+$)p(B"))) | 216 | (sample-text . "Cantonese ($(0GnM$(B,$(0N]0*Hd(B) $(0*/=((B, $(0+$)p(B"))) |
| 201 | 217 | ||
| @@ -211,16 +227,19 @@ information.") | |||
| 211 | (defun setup-chinese-cns-environment () | 227 | (defun setup-chinese-cns-environment () |
| 212 | (setq primary-language "Chinese-CNS") | 228 | (setq primary-language "Chinese-CNS") |
| 213 | 229 | ||
| 214 | (setq coding-category-iso-else 'coding-system-iso-2022-cn) | 230 | (setq coding-category-iso-else 'iso-2022-cn) |
| 231 | (setq coding-category-big5 'cn-big5) | ||
| 232 | (setq coding-category-iso-8-2 'cn-gb-2312) | ||
| 215 | 233 | ||
| 216 | (set-coding-priority | 234 | (set-coding-priority |
| 217 | '(coding-category-iso-7 | 235 | '(coding-category-iso-7 |
| 218 | coding-category-iso-else | 236 | coding-category-iso-else |
| 237 | coding-category-iso-8-2 | ||
| 219 | coding-category-big5)) | 238 | coding-category-big5)) |
| 220 | 239 | ||
| 221 | (setq-default buffer-file-coding-system 'coding-system-iso-2022-7) | 240 | (setq-default buffer-file-coding-system 'iso-2022-cn) |
| 222 | (set-terminal-coding-system 'coding-system-iso-2022-7) | 241 | (set-terminal-coding-system 'iso-2022-cn) |
| 223 | (set-keyboard-coding-system 'coding-system-iso-2022-7) | 242 | (set-keyboard-coding-system 'iso-2022-cn) |
| 224 | 243 | ||
| 225 | (setq default-input-method '("Chinese-CNS" . "quail-py-cns")) | 244 | (setq default-input-method '("Chinese-CNS" . "quail-py-cns")) |
| 226 | ) | 245 | ) |
| @@ -231,7 +250,7 @@ information.") | |||
| 231 | chinese-cns11643-3 chinese-cns11643-4 | 250 | chinese-cns11643-3 chinese-cns11643-4 |
| 232 | chinese-cns11643-5 chinese-cns11643-6 | 251 | chinese-cns11643-5 chinese-cns11643-6 |
| 233 | chinese-cns11643-7)) | 252 | chinese-cns11643-7)) |
| 234 | (coding-system . (coding-system-iso-2022-cn)) | 253 | (coding-system . (iso-2022-cn)) |
| 235 | (documentation . t))) | 254 | (documentation . t))) |
| 236 | 255 | ||
| 237 | ;;; chinese.el ends here | 256 | ;;; chinese.el ends here |