Mercurial > emacs
annotate lisp/language/japanese.el @ 17803:906dcb974266
Don't include term.el.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 14 May 1997 19:51:33 +0000 |
parents | 37ae0c18bd47 |
children | 084d922fcd78 |
rev | line source |
---|---|
17052 | 1 ;;; japanese.el --- Japanese support |
2 | |
3 ;; Copyright (C) 1995 Free Software Foundation, Inc. | |
4 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. | |
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 | |
17071 | 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. | |
17052 | 24 |
25 ;;; Commentary: | |
26 | |
27 ;; For Japanese, character sets JISX0201, JISX0208, JISX0212 are | |
28 ;; supported. | |
29 | |
30 ;;; Code: | |
31 | |
17088
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
32 (define-coding-system-alias 'iso-2022-7 'iso-2022-jp) |
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
33 (define-coding-system-alias 'iso-2022-7 'junet) |
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
34 |
17052 | 35 (make-coding-system |
17088
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
36 'shift_jis 1 ?S |
17052 | 37 "Coding-system of Shift-JIS used in Japan." t) |
38 | |
17088
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
39 (define-coding-system-alias 'shift_jis 'sjis) |
17052 | 40 |
41 (make-coding-system | |
17088
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
42 'iso-2022-jp-1978-irv 2 ?J |
17052 | 43 "Coding-system used for old jis terminal." |
44 '((ascii t) nil nil nil | |
45 short ascii-eol ascii-cntl seven nil nil use-roman use-oldjis)) | |
46 | |
17088
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
47 (define-coding-system-alias 'iso-2022-jp-1978-irv 'old-jis) |
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
48 |
17052 | 49 (make-coding-system |
17088
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
50 'euc-japan-1990 2 ?E |
17052 | 51 "Coding-system of Japanese EUC (Extended Unix Code)." |
52 '(ascii japanese-jisx0208 katakana-jisx0201 japanese-jisx0212 | |
53 short ascii-eol ascii-cntl nil nil single-shift)) | |
54 | |
17088
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
55 (define-coding-system-alias 'euc-japan-1990 'euc-japan) |
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
56 |
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
57 (register-input-method |
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
58 "Japanese" '("quail-ja-hiragana" quail-use-package "quail/japanese")) |
17052 | 59 (register-input-method |
60 "Japanese" '("quail-ja" quail-use-package "quail/japanese")) | |
61 | |
62 (defun setup-japanese-environment () | |
17769
37ae0c18bd47
Make functions setup-LANGUAGE-environment
Kenichi Handa <handa@m17n.org>
parents:
17088
diff
changeset
|
63 "Setup multilingual environment (MULE) for Japanese." |
17052 | 64 (interactive) |
17088
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
65 (setq coding-category-iso-8-2 'euc-japan-1990) |
17052 | 66 |
67 (set-coding-priority | |
68 '(coding-category-iso-7 | |
69 coding-category-iso-8-2 | |
70 coding-category-sjis | |
71 coding-category-iso-8-1 | |
72 coding-category-iso-else | |
73 coding-category-internal)) | |
74 | |
75 (if (eq system-type 'ms-dos) | |
76 (progn | |
17088
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
77 (setq-default buffer-file-coding-system 'sjis) |
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
78 (set-terminal-coding-system 'sjis) |
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
79 (set-keyboard-coding-system 'sjis) |
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
80 (setq default-process-coding-system '(sjis-dos . sjis-dos))) |
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
81 (setq-default buffer-file-coding-system 'iso-2022-jp) |
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
82 (set-terminal-coding-system 'iso-2022-jp) |
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
83 (set-keyboard-coding-system 'iso-2022-jp)) |
17052 | 84 |
85 (set-default-input-method "Japanese" "quail-ja") | |
17769
37ae0c18bd47
Make functions setup-LANGUAGE-environment
Kenichi Handa <handa@m17n.org>
parents:
17088
diff
changeset
|
86 |
37ae0c18bd47
Make functions setup-LANGUAGE-environment
Kenichi Handa <handa@m17n.org>
parents:
17088
diff
changeset
|
87 (setq sendmail-coding-system 'iso-2022-jp |
37ae0c18bd47
Make functions setup-LANGUAGE-environment
Kenichi Handa <handa@m17n.org>
parents:
17088
diff
changeset
|
88 rmail-file-coding-system 'iso-2022-jp) |
17052 | 89 ) |
90 | |
17769
37ae0c18bd47
Make functions setup-LANGUAGE-environment
Kenichi Handa <handa@m17n.org>
parents:
17088
diff
changeset
|
91 (defun describe-japanese-support () |
37ae0c18bd47
Make functions setup-LANGUAGE-environment
Kenichi Handa <handa@m17n.org>
parents:
17088
diff
changeset
|
92 "Describe how Emacs supports Japanese." |
37ae0c18bd47
Make functions setup-LANGUAGE-environment
Kenichi Handa <handa@m17n.org>
parents:
17088
diff
changeset
|
93 (interactive) |
37ae0c18bd47
Make functions setup-LANGUAGE-environment
Kenichi Handa <handa@m17n.org>
parents:
17088
diff
changeset
|
94 (describe-language-support-internal "Japanese")) |
37ae0c18bd47
Make functions setup-LANGUAGE-environment
Kenichi Handa <handa@m17n.org>
parents:
17088
diff
changeset
|
95 |
17052 | 96 (set-language-info-alist |
97 "Japanese" '((setup-function . setup-japanese-environment) | |
17769
37ae0c18bd47
Make functions setup-LANGUAGE-environment
Kenichi Handa <handa@m17n.org>
parents:
17088
diff
changeset
|
98 (describe-function . describe-japanese-support) |
17052 | 99 (tutorial . "TUTORIAL.jp") |
100 (charset . (japanese-jisx0208 japanese-jisx0208-1978 | |
101 japanese-jisx0212 latin-jisx0201 | |
102 katakana-jisx0201)) | |
17088
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
103 (coding-system . (euc-japan-1990 sjis |
76d2eb70aa0b
Remove prefix "coding-system-" from coding system symbol names.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
104 iso-2022-jp iso-2022-jp-1978-irv)) |
17769
37ae0c18bd47
Make functions setup-LANGUAGE-environment
Kenichi Handa <handa@m17n.org>
parents:
17088
diff
changeset
|
105 (sample-text . "Japanese ($BF|K\8l(B) $B$3$s$K$A$O(B, (I:]FAJ(B") |
37ae0c18bd47
Make functions setup-LANGUAGE-environment
Kenichi Handa <handa@m17n.org>
parents:
17088
diff
changeset
|
106 (documentation . nil))) |
17052 | 107 |
108 ;;; japanese.el ends here |