comparison lisp/mule/vietnamese.el @ 422:95016f13131a r21-2-19

Import from CVS: tag r21-2-19
author cvs
date Mon, 13 Aug 2007 11:25:01 +0200
parents e804706bfb8c
children
comparison
equal deleted inserted replaced
421:fff06e11db74 422:95016f13131a
1 ;;; vietnamese.el --- Support for Vietnamese 1 ;;; vietnamese.el --- Support for Vietnamese -*- coding: iso-2022-7bit; -*-
2 2
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. 3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation. 4 ;; Licensed to the Free Software Foundation.
5 ;; Copyright (C) 1997 MORIOKA Tomohiko 5 ;; Copyright (C) 1997 MORIOKA Tomohiko
6 6
186 (write-read-repeat r0 ,(car viet-vscii-encode-table))) 186 (write-read-repeat r0 ,(car viet-vscii-encode-table)))
187 (if (r0 == ,(charset-id 'vietnamese-viscii-upper)) 187 (if (r0 == ,(charset-id 'vietnamese-viscii-upper))
188 (;; Vietnamese upper 188 (;; Vietnamese upper
189 (read r0) 189 (read r0)
190 (r0 -= 128) 190 (r0 -= 128)
191 (write-read-repeat r0 ,(cdr viet-viscii-encode-table))) 191 (write-read-repeat r0 ,(cdr viet-vscii-encode-table)))
192 ;; not Vietnamese 192 ;; not Vietnamese
193 (write-read-repeat r0)))))))) 193 (write-read-repeat r0))))))))
194 "CCL program to encode VSCII-1.") 194 "CCL program to encode VSCII-1.")
195 195
196 (define-ccl-program ccl-encode-vscii-font 196 (define-ccl-program ccl-encode-vscii-font
210 "Coding-system used for VISCII 1.1." 210 "Coding-system used for VISCII 1.1."
211 `(mnemonic "VISCII" 211 `(mnemonic "VISCII"
212 decode ,ccl-decode-viscii 212 decode ,ccl-decode-viscii
213 encode ,ccl-encode-viscii)) 213 encode ,ccl-encode-viscii))
214 214
215 ;; it is not correct, but XEmacs doesn't have `ccl' category...
216 (coding-system-put 'viscii 'category 'iso-8-1)
217
215 ;; (make-coding-system 218 ;; (make-coding-system
216 ;; 'vietnamese-viscii 4 ?V 219 ;; 'vietnamese-viscii 4 ?V
217 ;; "8-bit encoding for Vietnamese VISCII 1.1 (MIME:VISCII)" 220 ;; "8-bit encoding for Vietnamese VISCII 1.1 (MIME:VISCII)"
218 ;; (cons ccl-decode-viscii ccl-encode-viscii)) 221 ;; '(ccl-decode-viscii . ccl-encode-viscii)
222 ;; '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper)
223 ;; (mime-charset . viscii)
224 ;; (valid-codes (0 . 255))))
219 225
220 ;; (define-coding-system-alias 'viscii 'vietnamese-viscii) 226 ;; (define-coding-system-alias 'viscii 'vietnamese-viscii)
221 227
222 (make-coding-system 228 (make-coding-system
223 'vscii 'ccl 229 'vscii 'ccl
227 encode ,ccl-encode-vscii)) 233 encode ,ccl-encode-vscii))
228 234
229 ;; (make-coding-system 235 ;; (make-coding-system
230 ;; 'vietnamese-vscii 4 ?v 236 ;; 'vietnamese-vscii 4 ?v
231 ;; "8-bit encoding for Vietnamese VSCII-1" 237 ;; "8-bit encoding for Vietnamese VSCII-1"
232 ;; (cons ccl-decode-vscii ccl-encode-vscii)) 238 ;; '(ccl-decode-vscii . ccl-encode-vscii)
239 ;; '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper)
240 ;; (valid-codes (0 . 255))))
233 241
234 ;; (define-coding-system-alias 'vscii 'vietnamese-vscii) 242 ;; (define-coding-system-alias 'vscii 'vietnamese-vscii)
235 243
236 (make-coding-system 244 (make-coding-system
237 'viqr 'no-conversion 245 'viqr 'no-conversion
242 pre-write-conversion viqr-pre-write-conversion)) 250 pre-write-conversion viqr-pre-write-conversion))
243 251
244 ;; (make-coding-system 252 ;; (make-coding-system
245 ;; 'vietnamese-viqr 0 ?q 253 ;; 'vietnamese-viqr 0 ?q
246 ;; "Vietnamese latin transcription (VIQR)" 254 ;; "Vietnamese latin transcription (VIQR)"
247 ;; nil) 255 ;; nil
248 ;; (put 'vietnamese-viqr 'post-read-conversion 'viqr-post-read-conversion) 256 ;; '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper)
249 ;; (put 'vietnamese-viqr 'pre-write-conversion 'viqr-pre-write-conversion) 257 ;; (post-read-conversion . viqr-post-read-conversion)
258 ;; (pre-write-conversion . viqr-pre-write-conversion)
259 ;; (charset-origin-alist
260 ;; (vietnamese-viscii-lower "VISCII" viet-encode-viscii-char)
261 ;; (vietnamese-viscii-upper "VISCII" viet-encode-viscii-char))))
250 262
251 ;; (define-coding-system-alias 'viqr 'vietnamese-viqr) 263 ;; (define-coding-system-alias 'viqr 'vietnamese-viqr)
252 264
253 ;; For VISCII users 265 ;; For VISCII users
254 (set-charset-ccl-program 'vietnamese-viscii-lower 266 (set-charset-ccl-program 'vietnamese-viscii-lower
263 ;; (cons (cons "viscii" ccl-encode-viscii-font) font-ccl-encoder-alist)) 275 ;; (cons (cons "viscii" ccl-encode-viscii-font) font-ccl-encoder-alist))
264 276
265 ;; (setq font-ccl-encoder-alist 277 ;; (setq font-ccl-encoder-alist
266 ;; (cons (cons "vscii" ccl-encode-vscii-font) font-ccl-encoder-alist)) 278 ;; (cons (cons "vscii" ccl-encode-vscii-font) font-ccl-encoder-alist))
267 279
280 ;; (defvar viet-viscii-nonascii-translation-table
281 ;; (make-translation-table-from-vector viet-viscii-decode-table)
282 ;; "Value of `nonascii-translation-table' in Vietnamese language environment.")
283
268 (set-language-info-alist 284 (set-language-info-alist
269 "Vietnamese" '((setup-function . setup-vietnamese-environment) 285 "Vietnamese" '((charset vietnamese-viscii-lower vietnamese-viscii-upper)
270 (charset . (vietnamese-viscii-lower 286 (coding-system viscii vscii viqr)
271 vietnamese-viscii-upper)) 287 (coding-priority viscii)
272 (coding-system . (viscii vscii viqr)) 288 (input-method . "vietnamese-viqr")
289 (features viet-util)
273 (sample-text . "Vietnamese (Ti,1*(Bng Vi,1.(Bt) Ch,1`(Bo b,1U(Bn") 290 (sample-text . "Vietnamese (Ti,1*(Bng Vi,1.(Bt) Ch,1`(Bo b,1U(Bn")
274 (documentation . "\ 291 (documentation . "\
275 For Vietnamese, Emacs uses special charasets internally. 292 For Vietnamese, Emacs uses special charasets internally.
276 They can be decoded from and encoded to VISCC, VSCII, and VIQR.") 293 They can be decoded from and encoded to VISCC, VSCII, and VIQR.
294 Current setting put higher priority to the coding system VISCII than VSCII.
295 If you prefer VSCII, please do: (prefer-coding-system 'vietnamese-vscii)")
277 )) 296 ))
278 297
279 ;;; vietnamese.el ends here 298 ;;; vietnamese.el ends here