Mercurial > emacs
annotate lisp/language/japanese.el @ 107925:d95939738dba
Fix previous change of *-composable-pattern.
author | Kenichi Handa <handa@etlken> |
---|---|
date | Wed, 07 Apr 2010 15:09:33 +0900 |
parents | 1d1d5d9bd884 |
children | 376148b31b5e |
rev | line source |
---|---|
47726
33d53d287ee4
Add "no-byte-compile: t" in first line.
Juanma Barranquero <lekktu@gmail.com>
parents:
43538
diff
changeset
|
1 ;;; japanese.el --- support for Japanese -*- coding: iso-2022-7bit; no-byte-compile: t -*- |
17052 | 2 |
106815 | 3 ;; Copyright (C) 1997, 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 |
13 ;; Keywords: multilingual, Japanese | |
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 | |
32 ;; For Japanese, character sets JISX0201, JISX0208, JISX0212 are | |
33 ;; supported. | |
34 | |
35 ;;; Code: | |
36 | |
89760
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
37 ;;; Load translation tables for CP932. |
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
38 (load "international/cp51932") |
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
39 (load "international/eucjp-ms") |
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
40 |
88414
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
41 (define-coding-system 'iso-2022-jp |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
42 "ISO 2022 based 7bit encoding for Japanese (MIME:ISO-2022-JP)." |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
43 :coding-type 'iso-2022 |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
44 :mnemonic ?J |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
45 :designation [(ascii japanese-jisx0208-1978 japanese-jisx0208 |
89794
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
46 latin-jisx0201) |
88414
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
47 nil nil nil] |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
48 :flags '(short ascii-at-eol ascii-at-cntl 7-bit designation) |
89794
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
49 :charset-list '(ascii japanese-jisx0208 |
89564
b1aa1cb0e3f6
(iso-2022-jp, iso-2022-jp-2, japanese-iso-8bit): Fix the order of
Kenichi Handa <handa@m17n.org>
parents:
89483
diff
changeset
|
50 japanese-jisx0208-1978 latin-jisx0201) |
90210
8006f0bf9292
(iso-2022-jp, iso-2022-jp-2)
Kenichi Handa <handa@m17n.org>
parents:
90200
diff
changeset
|
51 :mime-charset 'iso-2022-jp |
8006f0bf9292
(iso-2022-jp, iso-2022-jp-2)
Kenichi Handa <handa@m17n.org>
parents:
90200
diff
changeset
|
52 :suitable-for-keyboard t) |
19283
43b3f86776e4
Make coding system iso-2022-jp instead of
Kenichi Handa <handa@m17n.org>
parents:
18577
diff
changeset
|
53 |
43b3f86776e4
Make coding system iso-2022-jp instead of
Kenichi Handa <handa@m17n.org>
parents:
18577
diff
changeset
|
54 (define-coding-system-alias 'junet 'iso-2022-jp) |
17088
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
55 |
88414
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
56 (define-coding-system 'iso-2022-jp-2 |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
57 "ISO 2022 based 7bit encoding for CJK, Latin-1, Greek (MIME:ISO-2022-JP-2)." |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
58 :coding-type 'iso-2022 |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
59 :mnemonic ?J |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
60 :designation [(ascii japanese-jisx0208-1978 japanese-jisx0208 |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
61 latin-jisx0201 japanese-jisx0212 |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
62 chinese-gb2312 korean-ksc5601) |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
63 nil |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
64 (nil latin-iso8859-1 greek-iso8859-7) |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
65 nil] |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
66 :flags '(short ascii-at-eol ascii-at-cntl 7-bit designation single-shift |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
67 init-at-bol) |
89564
b1aa1cb0e3f6
(iso-2022-jp, iso-2022-jp-2, japanese-iso-8bit): Fix the order of
Kenichi Handa <handa@m17n.org>
parents:
89483
diff
changeset
|
68 :charset-list '(ascii japanese-jisx0208 japanese-jisx0212 |
b1aa1cb0e3f6
(iso-2022-jp, iso-2022-jp-2, japanese-iso-8bit): Fix the order of
Kenichi Handa <handa@m17n.org>
parents:
89483
diff
changeset
|
69 latin-jisx0201 japanese-jisx0208-1978 |
88414
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
70 chinese-gb2312 korean-ksc5601 |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
71 latin-iso8859-1 greek-iso8859-7) |
90210
8006f0bf9292
(iso-2022-jp, iso-2022-jp-2)
Kenichi Handa <handa@m17n.org>
parents:
90200
diff
changeset
|
72 :mime-charset 'iso-2022-jp-2 |
8006f0bf9292
(iso-2022-jp, iso-2022-jp-2)
Kenichi Handa <handa@m17n.org>
parents:
90200
diff
changeset
|
73 :suitable-for-keyboard t) |
24332
29c0557957ba
(iso-2022-jp-2): New coding system.
Kenichi Handa <handa@m17n.org>
parents:
24327
diff
changeset
|
74 |
89770
c0e5e49686a6
Add map #x00A6 <-> #xFFE4 to translation tables japanese-ucs-*-map.
Kenichi Handa <handa@m17n.org>
parents:
89760
diff
changeset
|
75 (let ((map ; JIS vs CP932 |
89760
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
76 '((#x301C . #xFF5E) ; WAVE DASH FULLWIDTH TILDE |
89791
3e22bfaa44de
(japanese-ucs-cp932-to-jis-map): Renamed
Kenichi Handa <handa@m17n.org>
parents:
89770
diff
changeset
|
77 (#x2014 . #x2015) ; EM DASH HORIZONTAL BAR |
89760
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
78 (#x2016 . #x2225) ; DOUBLE VERTICAL LINE PARALLEL TO |
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
79 (#x2212 . #xFF0D) ; MINUS SIGN FULLWIDTH HYPHEN-MINUS |
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
80 (#x00A2 . #xFFE0) ; CENT SIGN FULLWIDTH CENT SIGN |
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
81 (#x00A3 . #xFFE1) ; POUND SIGN FULLWIDTH POUND SIGN |
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
82 (#x00AC . #xFFE2) ; NOT SIGN FULLWIDTH NOT SIGN |
89770
c0e5e49686a6
Add map #x00A6 <-> #xFFE4 to translation tables japanese-ucs-*-map.
Kenichi Handa <handa@m17n.org>
parents:
89760
diff
changeset
|
83 (#x00A6 . #xFFE4) ; BROKEN LINE FULLWIDTH BROKEN LINE |
89760
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
84 ))) |
89794
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
85 (define-translation-table 'japanese-ucs-jis-to-cp932-map map) |
89760
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
86 (mapc #'(lambda (x) (let ((tmp (car x))) |
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
87 (setcar x (cdr x)) (setcdr x tmp))) |
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
88 map) |
89794
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
89 (define-translation-table 'japanese-ucs-cp932-to-jis-map map)) |
89760
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
90 |
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
91 ;; U+2014 (EM DASH) vs U+2015 (HORIZONTAL BAR) |
89791
3e22bfaa44de
(japanese-ucs-cp932-to-jis-map): Renamed
Kenichi Handa <handa@m17n.org>
parents:
89770
diff
changeset
|
92 (define-translation-table 'japanese-ucs-glibc-to-jis-map '((#x2015 . #x2014))) |
3e22bfaa44de
(japanese-ucs-cp932-to-jis-map): Renamed
Kenichi Handa <handa@m17n.org>
parents:
89770
diff
changeset
|
93 (define-translation-table 'japanese-ucs-jis-to-glibc-map '((#x2014 . #x2015))) |
89760
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
94 |
88414
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
95 (define-coding-system 'japanese-shift-jis |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
96 "Shift-JIS 8-bit encoding for Japanese (MIME:SHIFT_JIS)" |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
97 :coding-type 'shift-jis |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
98 :mnemonic ?S |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
99 :charset-list '(ascii katakana-jisx0201 japanese-jisx0208) |
88513 | 100 :mime-charset 'shift_jis) |
17052 | 101 |
18520
383d11185239
Swap args to define-coding-system-alias.
Richard M. Stallman <rms@gnu.org>
parents:
18377
diff
changeset
|
102 (define-coding-system-alias 'shift_jis 'japanese-shift-jis) |
383d11185239
Swap args to define-coding-system-alias.
Richard M. Stallman <rms@gnu.org>
parents:
18377
diff
changeset
|
103 (define-coding-system-alias 'sjis 'japanese-shift-jis) |
17052 | 104 |
89736
eba27ade3d5c
(japanese-cp932): New coding system.
Kenichi Handa <handa@m17n.org>
parents:
89564
diff
changeset
|
105 (define-coding-system 'japanese-cp932 |
eba27ade3d5c
(japanese-cp932): New coding system.
Kenichi Handa <handa@m17n.org>
parents:
89564
diff
changeset
|
106 "CP932 (Microsoft shift-jis)" |
eba27ade3d5c
(japanese-cp932): New coding system.
Kenichi Handa <handa@m17n.org>
parents:
89564
diff
changeset
|
107 :coding-type 'charset |
eba27ade3d5c
(japanese-cp932): New coding system.
Kenichi Handa <handa@m17n.org>
parents:
89564
diff
changeset
|
108 :mnemonic ?S |
eba27ade3d5c
(japanese-cp932): New coding system.
Kenichi Handa <handa@m17n.org>
parents:
89564
diff
changeset
|
109 :charset-list '(ascii katakana-sjis cp932-2-byte)) |
eba27ade3d5c
(japanese-cp932): New coding system.
Kenichi Handa <handa@m17n.org>
parents:
89564
diff
changeset
|
110 |
eba27ade3d5c
(japanese-cp932): New coding system.
Kenichi Handa <handa@m17n.org>
parents:
89564
diff
changeset
|
111 (define-coding-system-alias 'cp932 'japanese-cp932) |
eba27ade3d5c
(japanese-cp932): New coding system.
Kenichi Handa <handa@m17n.org>
parents:
89564
diff
changeset
|
112 |
88414
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
113 (define-coding-system 'japanese-iso-7bit-1978-irv |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
114 "ISO 2022 based 7-bit encoding for Japanese JISX0208-1978 and JISX0201-Roman." |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
115 :coding-type 'iso-2022 |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
116 :mnemonic ?j |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
117 :designation [(latin-jisx0201 japanese-jisx0208-1978 japanese-jisx0208 |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
118 japanese-jisx0212 katakana-jisx0201) |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
119 nil nil nil] |
88686
695cafe7a3bf
(japanese-iso-7bit-1978-irv): Add
Kenichi Handa <handa@m17n.org>
parents:
88668
diff
changeset
|
120 :flags '(short ascii-at-eol ascii-at-cntl 7-bit designation |
695cafe7a3bf
(japanese-iso-7bit-1978-irv): Add
Kenichi Handa <handa@m17n.org>
parents:
88668
diff
changeset
|
121 use-roman use-oldjis) |
695cafe7a3bf
(japanese-iso-7bit-1978-irv): Add
Kenichi Handa <handa@m17n.org>
parents:
88668
diff
changeset
|
122 :charset-list '(ascii latin-jisx0201 japanese-jisx0208-1978 japanese-jisx0208 |
695cafe7a3bf
(japanese-iso-7bit-1978-irv): Add
Kenichi Handa <handa@m17n.org>
parents:
88668
diff
changeset
|
123 japanese-jisx0212)) |
17052 | 124 |
18520
383d11185239
Swap args to define-coding-system-alias.
Richard M. Stallman <rms@gnu.org>
parents:
18377
diff
changeset
|
125 (define-coding-system-alias 'iso-2022-jp-1978-irv 'japanese-iso-7bit-1978-irv) |
383d11185239
Swap args to define-coding-system-alias.
Richard M. Stallman <rms@gnu.org>
parents:
18377
diff
changeset
|
126 (define-coding-system-alias 'old-jis 'japanese-iso-7bit-1978-irv) |
17088
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
127 |
88414
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
128 (define-coding-system 'japanese-iso-8bit |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
129 "ISO 2022 based EUC encoding for Japanese (MIME:EUC-JP)." |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
130 :coding-type 'iso-2022 |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
131 :mnemonic ?E |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
132 :designation [ascii japanese-jisx0208 katakana-jisx0201 japanese-jisx0212] |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
133 :flags '(short ascii-at-eol ascii-at-cntl single-shift) |
fad0f879877f
Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents:
43538
diff
changeset
|
134 :charset-list '(ascii latin-jisx0201 japanese-jisx0208 |
89884
be50b7dcd9eb
(japanese-iso-8bit): Fix order of :charset-list.
Kenichi Handa <handa@m17n.org>
parents:
89854
diff
changeset
|
135 katakana-jisx0201 japanese-jisx0212 |
be50b7dcd9eb
(japanese-iso-8bit): Fix order of :charset-list.
Kenichi Handa <handa@m17n.org>
parents:
89854
diff
changeset
|
136 japanese-jisx0208-1978) |
88513 | 137 :mime-charset 'euc-jp) |
17052 | 138 |
18520
383d11185239
Swap args to define-coding-system-alias.
Richard M. Stallman <rms@gnu.org>
parents:
18377
diff
changeset
|
139 (define-coding-system-alias 'euc-japan-1990 'japanese-iso-8bit) |
383d11185239
Swap args to define-coding-system-alias.
Richard M. Stallman <rms@gnu.org>
parents:
18377
diff
changeset
|
140 (define-coding-system-alias 'euc-japan 'japanese-iso-8bit) |
383d11185239
Swap args to define-coding-system-alias.
Richard M. Stallman <rms@gnu.org>
parents:
18377
diff
changeset
|
141 (define-coding-system-alias 'euc-jp 'japanese-iso-8bit) |
17088
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
142 |
89760
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
143 (define-coding-system 'eucjp-ms |
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
144 "eucJP-ms (like EUC-JP but with CP932 extension). |
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
145 eucJP-ms is defined in <http://www.opengroup.or.jp/jvc/cde/appendix.html>." |
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
146 :coding-type 'iso-2022 |
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
147 :mnemonic ?E |
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
148 :designation [ascii japanese-jisx0208 katakana-jisx0201 japanese-jisx0212] |
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
149 :flags '(short ascii-at-eol ascii-at-cntl single-shift) |
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
150 :charset-list '(ascii latin-jisx0201 japanese-jisx0208 |
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
151 katakana-jisx0201 japanese-jisx0212) |
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
152 :decode-translation-table 'eucjp-ms-decode |
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
153 :encode-translation-table 'eucjp-ms-encode) |
292dab2b369e
Load cp51932 and eucjp-ms.
Kenichi Handa <handa@m17n.org>
parents:
89736
diff
changeset
|
154 |
89794
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
155 (define-coding-system 'iso-2022-jp-2004 |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
156 "ISO 2022 based 7bit encoding for JIS X 0213:2004 (MIME:ISO-2022-JP-2004)." |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
157 :coding-type 'iso-2022 |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
158 :mnemonic ?J |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
159 :designation [(ascii japanese-jisx0208 japanese-jisx0213.2004-1 |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
160 japanese-jisx0213-1 japanese-jisx0213-2) |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
161 nil nil nil] |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
162 :flags '(short ascii-at-eol ascii-at-cntl 7-bit designation) |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
163 ;; init-at-bol) |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
164 :charset-list '(ascii japanese-jisx0208 japanese-jisx0213.2004-1 |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
165 japanese-jisx0213-1 japanese-jisx0213-2) |
90210
8006f0bf9292
(iso-2022-jp, iso-2022-jp-2)
Kenichi Handa <handa@m17n.org>
parents:
90200
diff
changeset
|
166 :mime-charset 'iso-2022-jp-2004 |
8006f0bf9292
(iso-2022-jp, iso-2022-jp-2)
Kenichi Handa <handa@m17n.org>
parents:
90200
diff
changeset
|
167 :suitable-for-keyboard t) |
89794
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
168 |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
169 (define-coding-system-alias 'iso-2022-jp-3 'iso-2022-jp-2004) |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
170 |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
171 (define-coding-system 'euc-jis-2004 |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
172 "ISO 2022 based EUC encoding for JIS X 0213 (MIME:EUC-JIS-2004)." |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
173 :coding-type 'iso-2022 |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
174 :mnemonic ?E |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
175 :designation [ascii japanese-jisx0213.2004-1 katakana-jisx0201 |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
176 japanese-jisx0213-2] |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
177 :flags '(short ascii-at-eol ascii-at-cntl single-shift) |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
178 :charset-list '(ascii latin-jisx0201 japanese-jisx0213.2004-1 |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
179 japanese-jisx0213-1 katakana-jisx0201 |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
180 japanese-jisx0213-2) |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
181 :mime-charset 'euc-jis-2004) |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
182 |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
183 (define-coding-system-alias 'euc-jisx0213 'euc-jis-2004) |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
184 |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
185 (define-coding-system 'japanese-shift-jis-2004 |
103760
56d7bae253ef
(japanese-shift-jis-2004): Fix typo in the docstring.
Kenichi Handa <handa@m17n.org>
parents:
102947
diff
changeset
|
186 "Shift_JIS 8-bit encoding for Japanese (MIME:SHIFT_JIS-2004)" |
89794
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
187 :coding-type 'shift-jis |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
188 :mnemonic ?S |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
189 :charset-list '(ascii katakana-jisx0201 |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
190 japanese-jisx0213.2004-1 japanese-jisx0213-2)) |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
191 |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
192 (define-coding-system-alias 'shift_jis-2004 'japanese-shift-jis-2004) |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
193 |
17052 | 194 (set-language-info-alist |
22983
7a010b8c0d99
("LANUGAGE-ENVIRONMENT"): Delete property setup-function or change
Kenichi Handa <handa@m17n.org>
parents:
22564
diff
changeset
|
195 "Japanese" '((setup-function . setup-japanese-environment-internal) |
91934
6299bdf88132
("Japanese"): Set exit-function to use-default-char-width-table.
Kenichi Handa <handa@m17n.org>
parents:
91327
diff
changeset
|
196 (exit-function . use-default-char-width-table) |
94951
7fed06569abe
("Japanese"): Set `iso639-language' property to `ja'.
Kenichi Handa <handa@m17n.org>
parents:
94665
diff
changeset
|
197 (iso639-language . ja) |
21462
a7ab22b5cfb3
Tutorial file name changed to TUTORIAL.ja.
Kenichi Handa <handa@m17n.org>
parents:
21375
diff
changeset
|
198 (tutorial . "TUTORIAL.ja") |
89981
64f70620b634
("Japanese"): Fix ordering of charsets.
Kenichi Handa <handa@m17n.org>
parents:
89943
diff
changeset
|
199 (charset japanese-jisx0208 |
35332
95ff316255a5
("Japanese"): Add japanese-jisx0213-1 and
Kenichi Handa <handa@m17n.org>
parents:
33778
diff
changeset
|
200 japanese-jisx0212 latin-jisx0201 katakana-jisx0201 |
89794
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
201 japanese-jisx0213.2004-1 japanese-jisx0213-1 |
89981
64f70620b634
("Japanese"): Fix ordering of charsets.
Kenichi Handa <handa@m17n.org>
parents:
89943
diff
changeset
|
202 japanese-jisx0213-2 japanese-jisx0208-1978) |
20739
5f2c7f919bbf
Adjusted for the change of make-coding-system. Register
Kenichi Handa <handa@m17n.org>
parents:
20159
diff
changeset
|
203 (coding-system iso-2022-jp japanese-iso-8bit |
89794
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
204 japanese-shift-jis japanese-iso-7bit-1978-irv |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
205 iso-2022-jp-2004 japanese-shift-jis-2004 |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
206 euc-jis-2004) |
20739
5f2c7f919bbf
Adjusted for the change of make-coding-system. Register
Kenichi Handa <handa@m17n.org>
parents:
20159
diff
changeset
|
207 (coding-priority iso-2022-jp japanese-iso-8bit |
89794
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
208 japanese-shift-jis |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
209 iso-2022-jp-2004 euc-jis-2004 |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
210 japanese-shift-jis-2004 |
0a96859927ce
(iso-2022-jp): Exclude japanese-jisx0212.
Kenichi Handa <handa@m17n.org>
parents:
89791
diff
changeset
|
211 iso-2022-jp-2) |
22983
7a010b8c0d99
("LANUGAGE-ENVIRONMENT"): Delete property setup-function or change
Kenichi Handa <handa@m17n.org>
parents:
22564
diff
changeset
|
212 (input-method . "japanese") |
7a010b8c0d99
("LANUGAGE-ENVIRONMENT"): Delete property setup-function or change
Kenichi Handa <handa@m17n.org>
parents:
22564
diff
changeset
|
213 (features japan-util) |
20739
5f2c7f919bbf
Adjusted for the change of make-coding-system. Register
Kenichi Handa <handa@m17n.org>
parents:
20159
diff
changeset
|
214 (sample-text . "Japanese ($BF|K\8l(B) $B$3$s$K$A$O(B, (I:]FAJ(B") |
17841
084d922fcd78
Coding system names changed as follows:
Kenichi Handa <handa@m17n.org>
parents:
17769
diff
changeset
|
215 (documentation . t))) |
17052 | 216 |
89854
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
217 (let ((map |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
218 ;; JISX0213-1 vs Unicode |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
219 '((#x2477 . [#x304B #x309A]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
220 (#x2478 . [#x304D #x309A]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
221 (#x2479 . [#x304F #x309A]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
222 (#x247a . [#x3051 #x309A]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
223 (#x247b . [#x3053 #x309A]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
224 (#x2577 . [#x30AB #x309A]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
225 (#x2578 . [#x30AD #x309A]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
226 (#x2579 . [#x30AF #x309A]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
227 (#x257a . [#x30B1 #x309A]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
228 (#x257b . [#x30B3 #x309A]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
229 (#x257c . [#x30BB #x309A]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
230 (#x257d . [#x30C4 #x309A]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
231 (#x257e . [#x30C8 #x309A]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
232 (#x2678 . [#x31F7 #x309A]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
233 (#x2b44 . [#x00E6 #x0300]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
234 (#x2b48 . [#x0254 #x0300]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
235 (#x2b49 . [#x0254 #x0301]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
236 (#x2b4a . [#x028C #x0300]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
237 (#x2b4b . [#x028C #x0301]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
238 (#x2b4c . [#x0259 #x0300]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
239 (#x2b4d . [#x0259 #x0301]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
240 (#x2b4e . [#x025A #x0300]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
241 (#x2b4f . [#x025A #x0301]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
242 (#x2b65 . [#x02E9 #x02E5]) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
243 (#x2b66 . [#x02E5 #x02E9]))) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
244 table) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
245 (dolist (elt map) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
246 (setcar elt (decode-char 'japanese-jisx0213-1 (car elt)))) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
247 (setq table (make-translation-table-from-alist map)) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
248 (define-translation-table 'jisx0213-to-unicode table) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
249 (define-translation-table 'unicode-to-jisx0213 |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
250 (char-table-extra-slot table 0))) |
94fdb409a40f
(jisx0213-to-unicode, unicode-to-jisx0213):
Kenichi Handa <handa@m17n.org>
parents:
89794
diff
changeset
|
251 |
100789
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
252 (defun compose-gstring-for-variation-glyph (gstring) |
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
253 "Compose glyph-string GSTRING for graphic display. |
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
254 GSTRING must have two glyphs; the first is a glyph for a han character, |
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
255 and the second is a glyph for a variation selector." |
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
256 (let* ((font (lgstring-font gstring)) |
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
257 (han (lgstring-char gstring 0)) |
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
258 (vs (lgstring-char gstring 1)) |
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
259 (glyphs (font-variation-glyphs font han)) |
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
260 (g0 (lgstring-glyph gstring 0)) |
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
261 (g1 (lgstring-glyph gstring 1))) |
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
262 (catch 'tag |
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
263 (dolist (elt glyphs) |
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
264 (if (= (car elt) vs) |
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
265 (progn |
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
266 (lglyph-set-code g0 (cdr elt)) |
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
267 (lglyph-set-from-to g0 (lglyph-from g0) (lglyph-to g1)) |
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
268 (lgstring-set-glyph gstring 1 nil) |
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
269 (throw 'tag gstring))))))) |
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
270 |
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
271 (let ((elt '([".." 1 compose-gstring-for-variation-glyph]))) |
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
272 (set-char-table-range composition-function-table '(#xFE00 . #xFE0F) elt) |
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
273 (set-char-table-range composition-function-table '(#xE0100 . #xE01EF) elt)) |
b3c1355a0eda
(compose-gstring-for-variation-glyph): New
Kenichi Handa <handa@m17n.org>
parents:
94951
diff
changeset
|
274 |
33778 | 275 (provide 'japanese) |
276 | |
93975
1e3a407766b9
Fix up comment convention on the arch-tag lines.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
91934
diff
changeset
|
277 ;; arch-tag: 450f5537-9d53-4d5e-b731-4cf116d8cbc9 |
17052 | 278 ;;; japanese.el ends here |