annotate lisp/language/japanese.el @ 77413:8a2381f5b72a

Update node listing.
author Chong Yidong <cyd@stupidchicken.com>
date Sun, 22 Apr 2007 13:58:16 +0000
parents e3694f1cb928
children 2c775ed8fc89 95d0cdf160ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
2
75347
e3694f1cb928 Add 2007 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 74605
diff changeset
3 ;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007
74544
43cc94d955c2 Update copyright years.
Glenn Morris <rgm@gnu.org>
parents: 64085
diff changeset
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,
75347
e3694f1cb928 Add 2007 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 74605
diff changeset
6 ;; 2005, 2006, 2007
62396
197607499a29 Fix copyrights.
Kenichi Handa <handa@m17n.org>
parents: 55472
diff changeset
7 ;; National Institute of Advanced Industrial Science and Technology (AIST)
197607499a29 Fix copyrights.
Kenichi Handa <handa@m17n.org>
parents: 55472
diff changeset
8 ;; Registration Number H14PRO021
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
9
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
10 ;; Keywords: multilingual, Japanese
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
11
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
12 ;; This file is part of GNU Emacs.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
13
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
14 ;; GNU Emacs is free software; you can redistribute it and/or modify
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
15 ;; it under the terms of the GNU General Public License as published by
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
16 ;; the Free Software Foundation; either version 2, or (at your option)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
17 ;; any later version.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
18
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
19 ;; GNU Emacs is distributed in the hope that it will be useful,
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
20 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
21 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
22 ;; GNU General Public License for more details.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
23
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
24 ;; You should have received a copy of the GNU General Public License
17071
70194012fb3a Fix FSF address in comment.
Karl Heuer <kwzh@gnu.org>
parents: 17052
diff changeset
25 ;; along with GNU Emacs; see the file COPYING. If not, write to the
64085
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 62396
diff changeset
26 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 62396
diff changeset
27 ;; Boston, MA 02110-1301, USA.
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
28
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
29 ;;; Commentary:
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
30
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
31 ;; For Japanese, character sets JISX0201, JISX0208, JISX0212 are
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
32 ;; supported.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
33
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
34 ;;; Code:
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
35
19283
43b3f86776e4 Make coding system iso-2022-jp instead of
Kenichi Handa <handa@m17n.org>
parents: 18577
diff changeset
36 (make-coding-system
43b3f86776e4 Make coding system iso-2022-jp instead of
Kenichi Handa <handa@m17n.org>
parents: 18577
diff changeset
37 'iso-2022-jp 2 ?J
42152
e3ae5ef41293 Improving doc strings.
Werner LEMBERG <wl@gnu.org>
parents: 38414
diff changeset
38 "ISO 2022 based 7bit encoding for Japanese (MIME:ISO-2022-JP)."
19283
43b3f86776e4 Make coding system iso-2022-jp instead of
Kenichi Handa <handa@m17n.org>
parents: 18577
diff changeset
39 '((ascii japanese-jisx0208-1978 japanese-jisx0208
29141
16b7fc8a65d2 (iso-2022-jp): Exclude katakana-jisx0201
Kenichi Handa <handa@m17n.org>
parents: 24332
diff changeset
40 latin-jisx0201 japanese-jisx0212) nil nil nil
20159
dce0d588d203 Give proper SAFE-CHARSET argument in each
Kenichi Handa <handa@m17n.org>
parents: 19554
diff changeset
41 short ascii-eol ascii-cntl seven)
20739
5f2c7f919bbf Adjusted for the change of make-coding-system. Register
Kenichi Handa <handa@m17n.org>
parents: 20159
diff changeset
42 '((safe-charsets ascii japanese-jisx0208-1978 japanese-jisx0208
29141
16b7fc8a65d2 (iso-2022-jp): Exclude katakana-jisx0201
Kenichi Handa <handa@m17n.org>
parents: 24332
diff changeset
43 latin-jisx0201 japanese-jisx0212)
22564
4836a83d3578 (iso-2022-jp): Delete spurious quote.
Richard M. Stallman <rms@gnu.org>
parents: 21462
diff changeset
44 (mime-charset . iso-2022-jp)))
19283
43b3f86776e4 Make coding system iso-2022-jp instead of
Kenichi Handa <handa@m17n.org>
parents: 18577
diff changeset
45
43b3f86776e4 Make coding system iso-2022-jp instead of
Kenichi Handa <handa@m17n.org>
parents: 18577
diff changeset
46 (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
47
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
48 (make-coding-system
24332
29c0557957ba (iso-2022-jp-2): New coding system.
Kenichi Handa <handa@m17n.org>
parents: 24327
diff changeset
49 'iso-2022-jp-2 2 ?J
42152
e3ae5ef41293 Improving doc strings.
Werner LEMBERG <wl@gnu.org>
parents: 38414
diff changeset
50 "ISO 2022 based 7bit encoding for CJK, Latin-1, and Greek (MIME:ISO-2022-JP-2)."
24332
29c0557957ba (iso-2022-jp-2): New coding system.
Kenichi Handa <handa@m17n.org>
parents: 24327
diff changeset
51 '((ascii japanese-jisx0208-1978 japanese-jisx0208
29143
6a44aa94971a (iso-2022-jp-2): Exclude katakana-jisx0201 to conform to RFC1554.
Kenichi Handa <handa@m17n.org>
parents: 29141
diff changeset
52 latin-jisx0201 japanese-jisx0212
24332
29c0557957ba (iso-2022-jp-2): New coding system.
Kenichi Handa <handa@m17n.org>
parents: 24327
diff changeset
53 chinese-gb2312 korean-ksc5601) nil
29c0557957ba (iso-2022-jp-2): New coding system.
Kenichi Handa <handa@m17n.org>
parents: 24327
diff changeset
54 (nil latin-iso8859-1 greek-iso8859-7) nil
43538
fbdf4317e25f (iso-2022-jp-2): Add init-bol flag.
Jason Rumney <jasonr@gnu.org>
parents: 42152
diff changeset
55 short ascii-eol ascii-cntl seven nil single-shift nil nil nil init-bol)
24332
29c0557957ba (iso-2022-jp-2): New coding system.
Kenichi Handa <handa@m17n.org>
parents: 24327
diff changeset
56 '((safe-charsets ascii japanese-jisx0208-1978 japanese-jisx0208
29143
6a44aa94971a (iso-2022-jp-2): Exclude katakana-jisx0201 to conform to RFC1554.
Kenichi Handa <handa@m17n.org>
parents: 29141
diff changeset
57 latin-jisx0201 japanese-jisx0212
24332
29c0557957ba (iso-2022-jp-2): New coding system.
Kenichi Handa <handa@m17n.org>
parents: 24327
diff changeset
58 chinese-gb2312 korean-ksc5601
29c0557957ba (iso-2022-jp-2): New coding system.
Kenichi Handa <handa@m17n.org>
parents: 24327
diff changeset
59 latin-iso8859-1 greek-iso8859-7)
29c0557957ba (iso-2022-jp-2): New coding system.
Kenichi Handa <handa@m17n.org>
parents: 24327
diff changeset
60 (mime-charset . iso-2022-jp-2)))
29c0557957ba (iso-2022-jp-2): New coding system.
Kenichi Handa <handa@m17n.org>
parents: 24327
diff changeset
61
29c0557957ba (iso-2022-jp-2): New coding system.
Kenichi Handa <handa@m17n.org>
parents: 24327
diff changeset
62 (make-coding-system
18203
0745f30aec66 Adjusted for coding system name change.
Kenichi Handa <handa@m17n.org>
parents: 17993
diff changeset
63 'japanese-shift-jis 1 ?S
42152
e3ae5ef41293 Improving doc strings.
Werner LEMBERG <wl@gnu.org>
parents: 38414
diff changeset
64 "Shift-JIS 8-bit encoding for Japanese (MIME:SHIFT_JIS)."
20159
dce0d588d203 Give proper SAFE-CHARSET argument in each
Kenichi Handa <handa@m17n.org>
parents: 19554
diff changeset
65 nil
20739
5f2c7f919bbf Adjusted for the change of make-coding-system. Register
Kenichi Handa <handa@m17n.org>
parents: 20159
diff changeset
66 '((safe-charsets ascii japanese-jisx0208 japanese-jisx0208-1978
5f2c7f919bbf Adjusted for the change of make-coding-system. Register
Kenichi Handa <handa@m17n.org>
parents: 20159
diff changeset
67 latin-jisx0201 katakana-jisx0201)
24327
6f70c8b3ea9a (japanese-shift-jis): Add charset-origin-alist property.
Kenichi Handa <handa@m17n.org>
parents: 23158
diff changeset
68 (mime-charset . shift_jis)
6f70c8b3ea9a (japanese-shift-jis): Add charset-origin-alist property.
Kenichi Handa <handa@m17n.org>
parents: 23158
diff changeset
69 (charset-origin-alist (japanese-jisx0208 "SJIS" encode-sjis-char)
6f70c8b3ea9a (japanese-shift-jis): Add charset-origin-alist property.
Kenichi Handa <handa@m17n.org>
parents: 23158
diff changeset
70 (katakana-jisx0201 "SJIS" encode-sjis-char))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
71
18520
383d11185239 Swap args to define-coding-system-alias.
Richard M. Stallman <rms@gnu.org>
parents: 18377
diff changeset
72 (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
73 (define-coding-system-alias 'sjis 'japanese-shift-jis)
55472
6763036919ea Add cp932 as alias for japanese-shift-jis.
Jason Rumney <jasonr@gnu.org>
parents: 52401
diff changeset
74 (define-coding-system-alias 'cp932 'japanese-shift-jis)
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
75
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
76 (make-coding-system
18203
0745f30aec66 Adjusted for coding system name change.
Kenichi Handa <handa@m17n.org>
parents: 17993
diff changeset
77 'japanese-iso-7bit-1978-irv 2 ?j
42152
e3ae5ef41293 Improving doc strings.
Werner LEMBERG <wl@gnu.org>
parents: 38414
diff changeset
78 "ISO 2022 based 7-bit encoding for Japanese JISX0208-1978 and JISX0201-Roman."
19283
43b3f86776e4 Make coding system iso-2022-jp instead of
Kenichi Handa <handa@m17n.org>
parents: 18577
diff changeset
79 '((ascii japanese-jisx0208-1978 japanese-jisx0208
43b3f86776e4 Make coding system iso-2022-jp instead of
Kenichi Handa <handa@m17n.org>
parents: 18577
diff changeset
80 latin-jisx0201 japanese-jisx0212 katakana-jisx0201 t) nil nil nil
20159
dce0d588d203 Give proper SAFE-CHARSET argument in each
Kenichi Handa <handa@m17n.org>
parents: 19554
diff changeset
81 short ascii-eol ascii-cntl seven nil nil use-roman use-oldjis)
dce0d588d203 Give proper SAFE-CHARSET argument in each
Kenichi Handa <handa@m17n.org>
parents: 19554
diff changeset
82 '(ascii japanese-jisx0208-1978 japanese-jisx0208 latin-jisx0201))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
83
18520
383d11185239 Swap args to define-coding-system-alias.
Richard M. Stallman <rms@gnu.org>
parents: 18377
diff changeset
84 (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
85 (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
86
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
87 (make-coding-system
18203
0745f30aec66 Adjusted for coding system name change.
Kenichi Handa <handa@m17n.org>
parents: 17993
diff changeset
88 'japanese-iso-8bit 2 ?E
42152
e3ae5ef41293 Improving doc strings.
Werner LEMBERG <wl@gnu.org>
parents: 38414
diff changeset
89 "ISO 2022 based EUC encoding for Japanese (MIME:EUC-JP)."
20739
5f2c7f919bbf Adjusted for the change of make-coding-system. Register
Kenichi Handa <handa@m17n.org>
parents: 20159
diff changeset
90 '(ascii japanese-jisx0208 katakana-jisx0201 japanese-jisx0212
20159
dce0d588d203 Give proper SAFE-CHARSET argument in each
Kenichi Handa <handa@m17n.org>
parents: 19554
diff changeset
91 short ascii-eol ascii-cntl nil nil single-shift)
20739
5f2c7f919bbf Adjusted for the change of make-coding-system. Register
Kenichi Handa <handa@m17n.org>
parents: 20159
diff changeset
92 '((safe-charsets ascii latin-jisx0201 japanese-jisx0208 japanese-jisx0208-1978
5f2c7f919bbf Adjusted for the change of make-coding-system. Register
Kenichi Handa <handa@m17n.org>
parents: 20159
diff changeset
93 katakana-jisx0201 japanese-jisx0212)
5f2c7f919bbf Adjusted for the change of make-coding-system. Register
Kenichi Handa <handa@m17n.org>
parents: 20159
diff changeset
94 (mime-charset . euc-jp)))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
95
18520
383d11185239 Swap args to define-coding-system-alias.
Richard M. Stallman <rms@gnu.org>
parents: 18377
diff changeset
96 (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
97 (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
98 (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
99
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
100 (set-language-info-alist
22983
7a010b8c0d99 ("LANUGAGE-ENVIRONMENT"): Delete property setup-function or change
Kenichi Handa <handa@m17n.org>
parents: 22564
diff changeset
101 "Japanese" '((setup-function . setup-japanese-environment-internal)
21462
a7ab22b5cfb3 Tutorial file name changed to TUTORIAL.ja.
Kenichi Handa <handa@m17n.org>
parents: 21375
diff changeset
102 (tutorial . "TUTORIAL.ja")
20739
5f2c7f919bbf Adjusted for the change of make-coding-system. Register
Kenichi Handa <handa@m17n.org>
parents: 20159
diff changeset
103 (charset japanese-jisx0208 japanese-jisx0208-1978
35332
95ff316255a5 ("Japanese"): Add japanese-jisx0213-1 and
Kenichi Handa <handa@m17n.org>
parents: 33778
diff changeset
104 japanese-jisx0212 latin-jisx0201 katakana-jisx0201
95ff316255a5 ("Japanese"): Add japanese-jisx0213-1 and
Kenichi Handa <handa@m17n.org>
parents: 33778
diff changeset
105 japanese-jisx0213-1 japanese-jisx0213-2)
20739
5f2c7f919bbf Adjusted for the change of make-coding-system. Register
Kenichi Handa <handa@m17n.org>
parents: 20159
diff changeset
106 (coding-system iso-2022-jp japanese-iso-8bit
5f2c7f919bbf Adjusted for the change of make-coding-system. Register
Kenichi Handa <handa@m17n.org>
parents: 20159
diff changeset
107 japanese-shift-jis japanese-iso-7bit-1978-irv)
5f2c7f919bbf Adjusted for the change of make-coding-system. Register
Kenichi Handa <handa@m17n.org>
parents: 20159
diff changeset
108 (coding-priority iso-2022-jp japanese-iso-8bit
24332
29c0557957ba (iso-2022-jp-2): New coding system.
Kenichi Handa <handa@m17n.org>
parents: 24327
diff changeset
109 japanese-shift-jis iso-2022-jp-2)
22983
7a010b8c0d99 ("LANUGAGE-ENVIRONMENT"): Delete property setup-function or change
Kenichi Handa <handa@m17n.org>
parents: 22564
diff changeset
110 (input-method . "japanese")
7a010b8c0d99 ("LANUGAGE-ENVIRONMENT"): Delete property setup-function or change
Kenichi Handa <handa@m17n.org>
parents: 22564
diff changeset
111 (features japan-util)
20739
5f2c7f919bbf Adjusted for the change of make-coding-system. Register
Kenichi Handa <handa@m17n.org>
parents: 20159
diff changeset
112 (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
113 (documentation . t)))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
114
33778
6d966e8b4bbe Use provide.
Dave Love <fx@gnu.org>
parents: 29143
diff changeset
115 (provide 'japanese)
6d966e8b4bbe Use provide.
Dave Love <fx@gnu.org>
parents: 29143
diff changeset
116
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 49948
diff changeset
117 ;;; arch-tag: 450f5537-9d53-4d5e-b731-4cf116d8cbc9
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
118 ;;; japanese.el ends here