Commit | Line | Data |
---|---|---|
60370d40 | 1 | ;;; japanese.el --- support for Japanese -*- coding: iso-2022-7bit; -*- |
4ed46869 | 2 | |
4ed46869 | 3 | ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. |
fa526c4a | 4 | ;; Licensed to the Free Software Foundation. |
4ed46869 KH |
5 | |
6 | ;; Keywords: multilingual, Japanese | |
7 | ||
8 | ;; This file is part of GNU Emacs. | |
9 | ||
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. | |
14 | ||
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. | |
19 | ||
20 | ;; You should have received a copy of the GNU General Public License | |
369314dc KH |
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. | |
4ed46869 KH |
24 | |
25 | ;;; Commentary: | |
26 | ||
27 | ;; For Japanese, character sets JISX0201, JISX0208, JISX0212 are | |
28 | ;; supported. | |
29 | ||
30 | ;;; Code: | |
31 | ||
25192984 KH |
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 | |
bd140771 | 36 | latin-jisx0201 japanese-jisx0212) nil nil nil |
6def6186 | 37 | short ascii-eol ascii-cntl seven) |
a79a3c79 | 38 | '((safe-charsets ascii japanese-jisx0208-1978 japanese-jisx0208 |
bd140771 | 39 | latin-jisx0201 japanese-jisx0212) |
2537259e | 40 | (mime-charset . iso-2022-jp))) |
25192984 KH |
41 | |
42 | (define-coding-system-alias 'junet 'iso-2022-jp) | |
dd53c981 | 43 | |
337ae039 KH |
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 | |
b4c93b68 | 48 | latin-jisx0201 japanese-jisx0212 |
337ae039 KH |
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) | |
52 | '((safe-charsets ascii japanese-jisx0208-1978 japanese-jisx0208 | |
b4c93b68 | 53 | latin-jisx0201 japanese-jisx0212 |
337ae039 KH |
54 | chinese-gb2312 korean-ksc5601 |
55 | latin-iso8859-1 greek-iso8859-7) | |
56 | (mime-charset . iso-2022-jp-2))) | |
57 | ||
4ed46869 | 58 | (make-coding-system |
4b9121fc | 59 | 'japanese-shift-jis 1 ?S |
6def6186 KH |
60 | "Shift-JIS 8-bit encoding for Japanese (MIME:SHIFT_JIS)" |
61 | nil | |
a79a3c79 KH |
62 | '((safe-charsets ascii japanese-jisx0208 japanese-jisx0208-1978 |
63 | latin-jisx0201 katakana-jisx0201) | |
ffd809f2 KH |
64 | (mime-charset . shift_jis) |
65 | (charset-origin-alist (japanese-jisx0208 "SJIS" encode-sjis-char) | |
66 | (katakana-jisx0201 "SJIS" encode-sjis-char)))) | |
4ed46869 | 67 | |
71eabd24 RS |
68 | (define-coding-system-alias 'shift_jis 'japanese-shift-jis) |
69 | (define-coding-system-alias 'sjis 'japanese-shift-jis) | |
4ed46869 KH |
70 | |
71 | (make-coding-system | |
4b9121fc KH |
72 | 'japanese-iso-7bit-1978-irv 2 ?j |
73 | "ISO 2022 based 7-bit encoding for Japanese JISX0208-1978 and JISX0201-Roman" | |
25192984 KH |
74 | '((ascii japanese-jisx0208-1978 japanese-jisx0208 |
75 | latin-jisx0201 japanese-jisx0212 katakana-jisx0201 t) nil nil nil | |
6def6186 KH |
76 | short ascii-eol ascii-cntl seven nil nil use-roman use-oldjis) |
77 | '(ascii japanese-jisx0208-1978 japanese-jisx0208 latin-jisx0201)) | |
4ed46869 | 78 | |
71eabd24 RS |
79 | (define-coding-system-alias 'iso-2022-jp-1978-irv 'japanese-iso-7bit-1978-irv) |
80 | (define-coding-system-alias 'old-jis 'japanese-iso-7bit-1978-irv) | |
dd53c981 | 81 | |
4ed46869 | 82 | (make-coding-system |
4b9121fc KH |
83 | 'japanese-iso-8bit 2 ?E |
84 | "ISO 2022 based EUC encoding for Japanese (MIME:EUC-JP)" | |
a79a3c79 | 85 | '(ascii japanese-jisx0208 katakana-jisx0201 japanese-jisx0212 |
6def6186 | 86 | short ascii-eol ascii-cntl nil nil single-shift) |
a79a3c79 KH |
87 | '((safe-charsets ascii latin-jisx0201 japanese-jisx0208 japanese-jisx0208-1978 |
88 | katakana-jisx0201 japanese-jisx0212) | |
89 | (mime-charset . euc-jp))) | |
4ed46869 | 90 | |
71eabd24 RS |
91 | (define-coding-system-alias 'euc-japan-1990 'japanese-iso-8bit) |
92 | (define-coding-system-alias 'euc-japan 'japanese-iso-8bit) | |
93 | (define-coding-system-alias 'euc-jp 'japanese-iso-8bit) | |
4ed46869 | 94 | |
4ed46869 | 95 | (set-language-info-alist |
a564ccf9 | 96 | "Japanese" '((setup-function . setup-japanese-environment-internal) |
0eb10198 | 97 | (exit-function . exit-japanese-environment) |
c089af63 | 98 | (tutorial . "TUTORIAL.ja") |
a79a3c79 | 99 | (charset japanese-jisx0208 japanese-jisx0208-1978 |
d6f08fd9 KH |
100 | japanese-jisx0212 latin-jisx0201 katakana-jisx0201 |
101 | japanese-jisx0213-1 japanese-jisx0213-2) | |
a79a3c79 KH |
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 | |
337ae039 | 105 | japanese-shift-jis iso-2022-jp-2) |
a564ccf9 KH |
106 | (input-method . "japanese") |
107 | (features japan-util) | |
a79a3c79 | 108 | (sample-text . "Japanese (\e$BF|K\8l\e(B) \e$B$3$s$K$A$O\e(B, \e(I:]FAJ\e(B") |
78eee0ed | 109 | (documentation . t))) |
4ed46869 | 110 | |
41da80b1 DL |
111 | (provide 'japanese) |
112 | ||
4ed46869 | 113 | ;;; japanese.el ends here |