Mercurial > emacs
annotate lisp/language/vietnamese.el @ 107063:8bd26043ea93
from trunk
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Sun, 31 Jan 2010 15:50:30 +0900 |
parents | 1d1d5d9bd884 |
children | 376148b31b5e |
rev | line source |
---|---|
38414
67b464da13ec
Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents:
33778
diff
changeset
|
1 ;;; vietnamese.el --- support for Vietnamese -*- coding: iso-2022-7bit; -*- |
17052 | 2 |
106815 | 3 ;; Copyright (C) 1998, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 |
74544 | 4 ;; Free Software Foundation, Inc. |
74605
6ee41fdd69ff
Update AIST copyright years.
Kenichi Handa <handa@m17n.org>
parents:
74544
diff
changeset
|
5 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
106815 | 6 ;; 2005, 2006, 2007, 2008, 2009, 2010 |
62396 | 7 ;; National Institute of Advanced Industrial Science and Technology (AIST) |
8 ;; Registration Number H14PRO021 | |
89483 | 9 ;; Copyright (C) 2003 |
10 ;; National Institute of Advanced Industrial Science and Technology (AIST) | |
11 ;; Registration Number H13PRO009 | |
17052 | 12 |
88559
2508448a287e
(windows-1258, cp1258): New coding
Dave Love <fx@gnu.org>
parents:
88513
diff
changeset
|
13 ;; Keywords: multilingual, Vietnamese, i18n |
17052 | 14 |
15 ;; This file is part of GNU Emacs. | |
16 | |
94665
55b7f25d920a
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
17 ;; GNU Emacs is free software: you can redistribute it and/or modify |
17052 | 18 ;; it under the terms of the GNU General Public License as published by |
94665
55b7f25d920a
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
19 ;; the Free Software Foundation, either version 3 of the License, or |
55b7f25d920a
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
20 ;; (at your option) any later version. |
17052 | 21 |
22 ;; GNU Emacs is distributed in the hope that it will be useful, | |
23 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
24 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
25 ;; GNU General Public License for more details. | |
26 | |
27 ;; You should have received a copy of the GNU General Public License | |
94665
55b7f25d920a
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
28 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
17052 | 29 |
30 ;;; Commentary: | |
31 | |
44962
39ed2c52ffb0
(viet-tcvn-decode-table, ccl-decode-tcvn)
Pavel Janík <Pavel@Janik.cz>
parents:
42152
diff
changeset
|
32 ;; For Vietnames, the character sets VISCII, VSCII and TCVN-5712 are |
39ed2c52ffb0
(viet-tcvn-decode-table, ccl-decode-tcvn)
Pavel Janík <Pavel@Janik.cz>
parents:
42152
diff
changeset
|
33 ;; supported. |
17052 | 34 |
35 ;;; Code: | |
36 | |
88414
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42152
diff
changeset
|
37 (define-coding-system 'vietnamese-viscii |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42152
diff
changeset
|
38 "8-bit encoding for Vietnamese VISCII 1.1 (MIME:VISCII)." |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42152
diff
changeset
|
39 :coding-type 'charset |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42152
diff
changeset
|
40 :mnemonic ?V |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42152
diff
changeset
|
41 :charset-list '(viscii) |
90209
182221fb0f2c
(vietnamese-viscii, vietnamese-vscii)
Kenichi Handa <handa@m17n.org>
parents:
90200
diff
changeset
|
42 :mime-charset 'viscii |
182221fb0f2c
(vietnamese-viscii, vietnamese-vscii)
Kenichi Handa <handa@m17n.org>
parents:
90200
diff
changeset
|
43 :suitable-for-file-name t) |
17052 | 44 |
18519
b6badf3614ea
Fix calls to define-coding-system-alias.
Richard M. Stallman <rms@gnu.org>
parents:
18377
diff
changeset
|
45 (define-coding-system-alias 'viscii 'vietnamese-viscii) |
18203
0745f30aec66
Adjusted for coding system name change.
Kenichi Handa <handa@m17n.org>
parents:
17993
diff
changeset
|
46 |
88414
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42152
diff
changeset
|
47 (define-coding-system 'vietnamese-vscii |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42152
diff
changeset
|
48 "8-bit encoding for Vietnamese VSCII-1." |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42152
diff
changeset
|
49 :coding-type 'charset |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42152
diff
changeset
|
50 :mnemonic ?v |
90209
182221fb0f2c
(vietnamese-viscii, vietnamese-vscii)
Kenichi Handa <handa@m17n.org>
parents:
90200
diff
changeset
|
51 :charset-list '(vscii) |
182221fb0f2c
(vietnamese-viscii, vietnamese-vscii)
Kenichi Handa <handa@m17n.org>
parents:
90200
diff
changeset
|
52 :suitable-for-file-name t) |
17052 | 53 |
18519
b6badf3614ea
Fix calls to define-coding-system-alias.
Richard M. Stallman <rms@gnu.org>
parents:
18377
diff
changeset
|
54 (define-coding-system-alias 'vscii 'vietnamese-vscii) |
18203
0745f30aec66
Adjusted for coding system name change.
Kenichi Handa <handa@m17n.org>
parents:
17993
diff
changeset
|
55 |
44962
39ed2c52ffb0
(viet-tcvn-decode-table, ccl-decode-tcvn)
Pavel Janík <Pavel@Janik.cz>
parents:
42152
diff
changeset
|
56 ;; (make-coding-system |
39ed2c52ffb0
(viet-tcvn-decode-table, ccl-decode-tcvn)
Pavel Janík <Pavel@Janik.cz>
parents:
42152
diff
changeset
|
57 ;; 'vietnamese-vps 4 ?p |
39ed2c52ffb0
(viet-tcvn-decode-table, ccl-decode-tcvn)
Pavel Janík <Pavel@Janik.cz>
parents:
42152
diff
changeset
|
58 ;; "8-bit encoding for Vietnamese VPS" |
39ed2c52ffb0
(viet-tcvn-decode-table, ccl-decode-tcvn)
Pavel Janík <Pavel@Janik.cz>
parents:
42152
diff
changeset
|
59 ;; '(ccl-decode-vps . ccl-encode-vps) |
39ed2c52ffb0
(viet-tcvn-decode-table, ccl-decode-tcvn)
Pavel Janík <Pavel@Janik.cz>
parents:
42152
diff
changeset
|
60 ;; '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper) |
39ed2c52ffb0
(viet-tcvn-decode-table, ccl-decode-tcvn)
Pavel Janík <Pavel@Janik.cz>
parents:
42152
diff
changeset
|
61 ;; (valid-codes (0 . 255)))) |
49598
0d8b17d428b5
Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
44962
diff
changeset
|
62 ;; |
44962
39ed2c52ffb0
(viet-tcvn-decode-table, ccl-decode-tcvn)
Pavel Janík <Pavel@Janik.cz>
parents:
42152
diff
changeset
|
63 ;; (define-coding-system-alias 'vps 'vietnamese-vps) |
39ed2c52ffb0
(viet-tcvn-decode-table, ccl-decode-tcvn)
Pavel Janík <Pavel@Janik.cz>
parents:
42152
diff
changeset
|
64 |
88414
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42152
diff
changeset
|
65 (define-coding-system 'vietnamese-viqr |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42152
diff
changeset
|
66 "Vietnamese latin transcription (VIQR)." |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42152
diff
changeset
|
67 :coding-type 'utf-8 |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42152
diff
changeset
|
68 :mnemonic ?q |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42152
diff
changeset
|
69 :charset-list '(ascii viscii) |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42152
diff
changeset
|
70 :post-read-conversion 'viqr-post-read-conversion |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42152
diff
changeset
|
71 :pre-write-conversion 'viqr-pre-write-conversion) |
18203
0745f30aec66
Adjusted for coding system name change.
Kenichi Handa <handa@m17n.org>
parents:
17993
diff
changeset
|
72 |
18519
b6badf3614ea
Fix calls to define-coding-system-alias.
Richard M. Stallman <rms@gnu.org>
parents:
18377
diff
changeset
|
73 (define-coding-system-alias 'viqr 'vietnamese-viqr) |
17052 | 74 |
75 (set-language-info-alist | |
88414
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
42152
diff
changeset
|
76 "Vietnamese" `((charset viscii) |
20739
5f2c7f919bbf
Adjusted for the change of make-coding-system. Register
Kenichi Handa <handa@m17n.org>
parents:
20155
diff
changeset
|
77 (coding-system vietnamese-viscii vietnamese-vscii |
89483 | 78 vietnamese-tcvn vietnamese-viqr windows-1258) |
79 (nonascii-translation . viscii) | |
20739
5f2c7f919bbf
Adjusted for the change of make-coding-system. Register
Kenichi Handa <handa@m17n.org>
parents:
20155
diff
changeset
|
80 (coding-priority vietnamese-viscii) |
22983
7a010b8c0d99
("LANUGAGE-ENVIRONMENT"): Delete property setup-function or change
Kenichi Handa <handa@m17n.org>
parents:
22879
diff
changeset
|
81 (input-method . "vietnamese-viqr") |
7a010b8c0d99
("LANUGAGE-ENVIRONMENT"): Delete property setup-function or change
Kenichi Handa <handa@m17n.org>
parents:
22879
diff
changeset
|
82 (unibyte-display . vietnamese-viscii) |
7a010b8c0d99
("LANUGAGE-ENVIRONMENT"): Delete property setup-function or change
Kenichi Handa <handa@m17n.org>
parents:
22879
diff
changeset
|
83 (features viet-util) |
17772
550afdbb31d8
Make functions setup-LANGUAGE-environment
Kenichi Handa <handa@m17n.org>
parents:
17170
diff
changeset
|
84 (sample-text . "Vietnamese (Ti,1*(Bng Vi,1.(Bt) Ch,1`(Bo b,1U(Bn") |
17993
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17841
diff
changeset
|
85 (documentation . "\ |
49727
350e89367682
("Vietnamese"): Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents:
49598
diff
changeset
|
86 For Vietnamese, Emacs uses special charsets internally. |
89483 | 87 They can be decoded from and encoded to VISCII, VSCII, TCVN-5712, VIQR |
88728
e18cd612d3c4
(vietnamese-tcvn, tcvn): New coding
Dave Love <fx@gnu.org>
parents:
88722
diff
changeset
|
88 and windows-1258. VSCII is deprecated in favour of TCVN-5712. The |
89483 | 89 Current setting gives higher priority to the coding system VISCII than |
88728
e18cd612d3c4
(vietnamese-tcvn, tcvn): New coding
Dave Love <fx@gnu.org>
parents:
88722
diff
changeset
|
90 TCVN-5712. If you prefer TCVN-5712, please do: (prefer-coding-system |
e18cd612d3c4
(vietnamese-tcvn, tcvn): New coding
Dave Love <fx@gnu.org>
parents:
88722
diff
changeset
|
91 'vietnamese-tcvn). There are two Vietnamese input methods: VIQR and |
89483 | 92 Telex, VIQR is the default setting."))) |
17052 | 93 |
88559
2508448a287e
(windows-1258, cp1258): New coding
Dave Love <fx@gnu.org>
parents:
88513
diff
changeset
|
94 (define-coding-system 'windows-1258 |
2508448a287e
(windows-1258, cp1258): New coding
Dave Love <fx@gnu.org>
parents:
88513
diff
changeset
|
95 "windows-1258 encoding for Vietnamese (MIME: WINDOWS-1258)" |
2508448a287e
(windows-1258, cp1258): New coding
Dave Love <fx@gnu.org>
parents:
88513
diff
changeset
|
96 :coding-type 'charset |
2508448a287e
(windows-1258, cp1258): New coding
Dave Love <fx@gnu.org>
parents:
88513
diff
changeset
|
97 :mnemonic ?* |
2508448a287e
(windows-1258, cp1258): New coding
Dave Love <fx@gnu.org>
parents:
88513
diff
changeset
|
98 :charset-list '(windows-1258) |
2508448a287e
(windows-1258, cp1258): New coding
Dave Love <fx@gnu.org>
parents:
88513
diff
changeset
|
99 :mime-charset 'windows-1258) |
2508448a287e
(windows-1258, cp1258): New coding
Dave Love <fx@gnu.org>
parents:
88513
diff
changeset
|
100 (define-coding-system-alias 'cp1258 'windows-1258) |
2508448a287e
(windows-1258, cp1258): New coding
Dave Love <fx@gnu.org>
parents:
88513
diff
changeset
|
101 |
88728
e18cd612d3c4
(vietnamese-tcvn, tcvn): New coding
Dave Love <fx@gnu.org>
parents:
88722
diff
changeset
|
102 (define-coding-system 'vietnamese-tcvn |
e18cd612d3c4
(vietnamese-tcvn, tcvn): New coding
Dave Love <fx@gnu.org>
parents:
88722
diff
changeset
|
103 "8-bit encoding for Vietnamese TCVN-5712" |
e18cd612d3c4
(vietnamese-tcvn, tcvn): New coding
Dave Love <fx@gnu.org>
parents:
88722
diff
changeset
|
104 :coding-type 'charset |
e18cd612d3c4
(vietnamese-tcvn, tcvn): New coding
Dave Love <fx@gnu.org>
parents:
88722
diff
changeset
|
105 :mnemonic ?t |
90209
182221fb0f2c
(vietnamese-viscii, vietnamese-vscii)
Kenichi Handa <handa@m17n.org>
parents:
90200
diff
changeset
|
106 :charset-list '(tcvn-5712) |
182221fb0f2c
(vietnamese-viscii, vietnamese-vscii)
Kenichi Handa <handa@m17n.org>
parents:
90200
diff
changeset
|
107 :suitable-for-file-name t) |
88728
e18cd612d3c4
(vietnamese-tcvn, tcvn): New coding
Dave Love <fx@gnu.org>
parents:
88722
diff
changeset
|
108 (define-coding-system-alias 'tcvn 'vietnamese-tcvn) |
90260
0ca0d9181b5e
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-95
Miles Bader <miles@gnu.org>
diff
changeset
|
109 (define-coding-system-alias 'tcvn-5712 'vietnamese-tcvn) |
17052 | 110 |
33778 | 111 (provide 'vietnamese) |
112 | |
93975
1e3a407766b9
Fix up comment convention on the arch-tag lines.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
91327
diff
changeset
|
113 ;; arch-tag: 5bd4f1aa-2d4e-4f33-b7d8-0679c6a19ee6 |
17052 | 114 ;;; vietnamese.el ends here |