annotate lisp/language/japanese.el @ 89429:3c978149859b

(Fdefine_coding_system_internal): Fix for the case that coding_type is Qcharset.
author Kenichi Handa <handa@m17n.org>
date Tue, 20 May 2003 13:05:14 +0000
parents 695cafe7a3bf
children 2f877ed80fa6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38414
67b464da13ec Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 35332
diff changeset
1 ;;; japanese.el --- support for Japanese -*- coding: iso-2022-7bit; -*-
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
2
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
18377
8b4a66c66dd6 Change copyright notice.
Richard M. Stallman <rms@gnu.org>
parents: 18309
diff changeset
4 ;; Licensed to the Free Software Foundation.
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
5
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
6 ;; Keywords: multilingual, Japanese
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
7
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
8 ;; This file is part of GNU Emacs.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
9
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
11 ;; it under the terms of the GNU General Public License as published by
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your option)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
13 ;; any later version.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
14
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
15 ;; GNU Emacs is distributed in the hope that it will be useful,
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
18 ;; GNU General Public License for more details.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
19
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
20 ;; 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
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
70194012fb3a Fix FSF address in comment.
Karl Heuer <kwzh@gnu.org>
parents: 17052
diff changeset
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
70194012fb3a Fix FSF address in comment.
Karl Heuer <kwzh@gnu.org>
parents: 17052
diff changeset
23 ;; Boston, MA 02111-1307, USA.
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
24
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
25 ;;; Commentary:
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
26
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
27 ;; For Japanese, character sets JISX0201, JISX0208, JISX0212 are
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
28 ;; supported.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
29
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
30 ;;; Code:
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
31
88414
fad0f879877f Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents: 43538
diff changeset
32 (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
33 "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
34 :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
35 :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
36 :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
37 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
38 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
39 :flags '(short ascii-at-eol ascii-at-cntl 7-bit designation)
fad0f879877f Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents: 43538
diff changeset
40 :charset-list '(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
41 latin-jisx0201 japanese-jisx0212)
88513
bafe04d82c5d Fix :mime-charset properties.
Dave Love <fx@gnu.org>
parents: 88414
diff changeset
42 :mime-charset 'iso-2022-jp)
19283
43b3f86776e4 Make coding system iso-2022-jp instead of
Kenichi Handa <handa@m17n.org>
parents: 18577
diff changeset
43
43b3f86776e4 Make coding system iso-2022-jp instead of
Kenichi Handa <handa@m17n.org>
parents: 18577
diff changeset
44 (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
45
88414
fad0f879877f Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents: 43538
diff changeset
46 (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
47 "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
48 :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
49 :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
50 :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
51 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
52 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
53 nil
fad0f879877f Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents: 43538
diff changeset
54 (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
55 nil]
fad0f879877f Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents: 43538
diff changeset
56 :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
57 init-at-bol)
fad0f879877f Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents: 43538
diff changeset
58 :charset-list '(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
59 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
60 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
61 latin-iso8859-1 greek-iso8859-7)
88513
bafe04d82c5d Fix :mime-charset properties.
Dave Love <fx@gnu.org>
parents: 88414
diff changeset
62 :mime-charset 'iso-2022-jp-2)
24332
29c0557957ba (iso-2022-jp-2): New coding system.
Kenichi Handa <handa@m17n.org>
parents: 24327
diff changeset
63
88414
fad0f879877f Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents: 43538
diff changeset
64 (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
65 "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
66 :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
67 :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
68 :charset-list '(ascii katakana-jisx0201 japanese-jisx0208)
88513
bafe04d82c5d Fix :mime-charset properties.
Dave Love <fx@gnu.org>
parents: 88414
diff changeset
69 :mime-charset 'shift_jis)
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
70
18520
383d11185239 Swap args to define-coding-system-alias.
Richard M. Stallman <rms@gnu.org>
parents: 18377
diff changeset
71 (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
72 (define-coding-system-alias 'sjis 'japanese-shift-jis)
88668
d1b1b7398049 Comment.
Dave Love <fx@gnu.org>
parents: 88513
diff changeset
73 ;; Fixme: AKA Shift-JIS according to
d1b1b7398049 Comment.
Dave Love <fx@gnu.org>
parents: 88513
diff changeset
74 ;; <URL:http://www.microsoft.com/globaldev/reference/WinCP.asp>. Is
d1b1b7398049 Comment.
Dave Love <fx@gnu.org>
parents: 88513
diff changeset
75 ;; that correct?
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
76
88414
fad0f879877f Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents: 43538
diff changeset
77 (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
78 "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
79 :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
80 :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
81 :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
82 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
83 nil nil nil]
88686
695cafe7a3bf (japanese-iso-7bit-1978-irv): Add
Kenichi Handa <handa@m17n.org>
parents: 88668
diff changeset
84 :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
85 use-roman use-oldjis)
695cafe7a3bf (japanese-iso-7bit-1978-irv): Add
Kenichi Handa <handa@m17n.org>
parents: 88668
diff changeset
86 :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
87 japanese-jisx0212))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
88
18520
383d11185239 Swap args to define-coding-system-alias.
Richard M. Stallman <rms@gnu.org>
parents: 18377
diff changeset
89 (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
90 (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
91
88414
fad0f879877f Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents: 43538
diff changeset
92 (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
93 "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
94 :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
95 :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
96 :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
97 :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
98 :charset-list '(ascii latin-jisx0201 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
99 japanese-jisx0208-1978
fad0f879877f Call define-coding-system instead of make-coding-system. All CCL program deleted.
Kenichi Handa <handa@m17n.org>
parents: 43538
diff changeset
100 katakana-jisx0201 japanese-jisx0212)
88513
bafe04d82c5d Fix :mime-charset properties.
Dave Love <fx@gnu.org>
parents: 88414
diff changeset
101 :mime-charset 'euc-jp)
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
102
18520
383d11185239 Swap args to define-coding-system-alias.
Richard M. Stallman <rms@gnu.org>
parents: 18377
diff changeset
103 (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
104 (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
105 (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
106
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
107 (set-language-info-alist
22983
7a010b8c0d99 ("LANUGAGE-ENVIRONMENT"): Delete property setup-function or change
Kenichi Handa <handa@m17n.org>
parents: 22564
diff changeset
108 "Japanese" '((setup-function . setup-japanese-environment-internal)
21375
ecfe57c6e4a8 Set exit-function to
Kenichi Handa <handa@m17n.org>
parents: 20739
diff changeset
109 (exit-function . exit-japanese-environment)
21462
a7ab22b5cfb3 Tutorial file name changed to TUTORIAL.ja.
Kenichi Handa <handa@m17n.org>
parents: 21375
diff changeset
110 (tutorial . "TUTORIAL.ja")
20739
5f2c7f919bbf Adjusted for the change of make-coding-system. Register
Kenichi Handa <handa@m17n.org>
parents: 20159
diff changeset
111 (charset japanese-jisx0208 japanese-jisx0208-1978
35332
95ff316255a5 ("Japanese"): Add japanese-jisx0213-1 and
Kenichi Handa <handa@m17n.org>
parents: 33778
diff changeset
112 japanese-jisx0212 latin-jisx0201 katakana-jisx0201
95ff316255a5 ("Japanese"): Add japanese-jisx0213-1 and
Kenichi Handa <handa@m17n.org>
parents: 33778
diff changeset
113 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
114 (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
115 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
116 (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
117 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
118 (input-method . "japanese")
7a010b8c0d99 ("LANUGAGE-ENVIRONMENT"): Delete property setup-function or change
Kenichi Handa <handa@m17n.org>
parents: 22564
diff changeset
119 (features japan-util)
20739
5f2c7f919bbf Adjusted for the change of make-coding-system. Register
Kenichi Handa <handa@m17n.org>
parents: 20159
diff changeset
120 (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
121 (documentation . t)))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
122
33778
6d966e8b4bbe Use provide.
Dave Love <fx@gnu.org>
parents: 29143
diff changeset
123 (provide 'japanese)
6d966e8b4bbe Use provide.
Dave Love <fx@gnu.org>
parents: 29143
diff changeset
124
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
125 ;;; japanese.el ends here