Rework docstring (wording by Eli Zaretskii and Kai Grossjohann).
[emacs.git] / lisp / language / japanese.el
blob84efe70e4bbfc8fd2554908a68e5ee77068e9994
1 ;;; japanese.el --- support for Japanese -*- coding: iso-2022-7bit; no-byte-compile: t -*-
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation.
6 ;; Keywords: multilingual, Japanese
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
13 ;; any later version.
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
25 ;;; Commentary:
27 ;; For Japanese, character sets JISX0201, JISX0208, JISX0212 are
28 ;; supported.
30 ;;; Code:
32 (make-coding-system
33 'iso-2022-jp 2 ?J
34 "ISO 2022 based 7bit encoding for Japanese (MIME:ISO-2022-JP)."
35 '((ascii japanese-jisx0208-1978 japanese-jisx0208
36 latin-jisx0201 japanese-jisx0212) nil nil nil
37 short ascii-eol ascii-cntl seven)
38 '((safe-charsets ascii japanese-jisx0208-1978 japanese-jisx0208
39 latin-jisx0201 japanese-jisx0212)
40 (mime-charset . iso-2022-jp)))
42 (define-coding-system-alias 'junet 'iso-2022-jp)
44 (make-coding-system
45 'iso-2022-jp-2 2 ?J
46 "ISO 2022 based 7bit encoding for CJK, Latin-1, and Greek (MIME:ISO-2022-JP-2)."
47 '((ascii japanese-jisx0208-1978 japanese-jisx0208
48 latin-jisx0201 japanese-jisx0212
49 chinese-gb2312 korean-ksc5601) nil
50 (nil latin-iso8859-1 greek-iso8859-7) nil
51 short ascii-eol ascii-cntl seven nil single-shift nil nil nil init-bol)
52 '((safe-charsets ascii japanese-jisx0208-1978 japanese-jisx0208
53 latin-jisx0201 japanese-jisx0212
54 chinese-gb2312 korean-ksc5601
55 latin-iso8859-1 greek-iso8859-7)
56 (mime-charset . iso-2022-jp-2)))
58 (make-coding-system
59 'japanese-shift-jis 1 ?S
60 "Shift-JIS 8-bit encoding for Japanese (MIME:SHIFT_JIS)."
61 nil
62 '((safe-charsets ascii japanese-jisx0208 japanese-jisx0208-1978
63 latin-jisx0201 katakana-jisx0201)
64 (mime-charset . shift_jis)
65 (charset-origin-alist (japanese-jisx0208 "SJIS" encode-sjis-char)
66 (katakana-jisx0201 "SJIS" encode-sjis-char))))
68 (define-coding-system-alias 'shift_jis 'japanese-shift-jis)
69 (define-coding-system-alias 'sjis 'japanese-shift-jis)
70 (define-coding-system-alias 'cp932 'japanese-shift-jis)
72 (make-coding-system
73 'japanese-iso-7bit-1978-irv 2 ?j
74 "ISO 2022 based 7-bit encoding for Japanese JISX0208-1978 and JISX0201-Roman."
75 '((ascii japanese-jisx0208-1978 japanese-jisx0208
76 latin-jisx0201 japanese-jisx0212 katakana-jisx0201 t) nil nil nil
77 short ascii-eol ascii-cntl seven nil nil use-roman use-oldjis)
78 '(ascii japanese-jisx0208-1978 japanese-jisx0208 latin-jisx0201))
80 (define-coding-system-alias 'iso-2022-jp-1978-irv 'japanese-iso-7bit-1978-irv)
81 (define-coding-system-alias 'old-jis 'japanese-iso-7bit-1978-irv)
83 (make-coding-system
84 'japanese-iso-8bit 2 ?E
85 "ISO 2022 based EUC encoding for Japanese (MIME:EUC-JP)."
86 '(ascii japanese-jisx0208 katakana-jisx0201 japanese-jisx0212
87 short ascii-eol ascii-cntl nil nil single-shift)
88 '((safe-charsets ascii latin-jisx0201 japanese-jisx0208 japanese-jisx0208-1978
89 katakana-jisx0201 japanese-jisx0212)
90 (mime-charset . euc-jp)))
92 (define-coding-system-alias 'euc-japan-1990 'japanese-iso-8bit)
93 (define-coding-system-alias 'euc-japan 'japanese-iso-8bit)
94 (define-coding-system-alias 'euc-jp 'japanese-iso-8bit)
96 (set-language-info-alist
97 "Japanese" '((setup-function . setup-japanese-environment-internal)
98 (tutorial . "TUTORIAL.ja")
99 (charset japanese-jisx0208 japanese-jisx0208-1978
100 japanese-jisx0212 latin-jisx0201 katakana-jisx0201
101 japanese-jisx0213-1 japanese-jisx0213-2)
102 (coding-system iso-2022-jp japanese-iso-8bit
103 japanese-shift-jis japanese-iso-7bit-1978-irv)
104 (coding-priority iso-2022-jp japanese-iso-8bit
105 japanese-shift-jis iso-2022-jp-2)
106 (input-method . "japanese")
107 (features japan-util)
108 (sample-text . "Japanese (\e$BF|K\8l\e(B) \e$B$3$s$K$A$O\e(B, \e(I:]FAJ\e(B")
109 (documentation . t)))
111 (provide 'japanese)
113 ;;; arch-tag: 450f5537-9d53-4d5e-b731-4cf116d8cbc9
114 ;;; japanese.el ends here