1 ;;; japanese.el --- Japanese support
3 ;; Copyright (C) 1995 Free Software Foundation, Inc.
4 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
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)
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.
27 ;; For Japanese, character sets JISX0201, JISX0208, JISX0212 are
32 (define-coding-system-alias 'iso-2022-7
'iso-2022-jp
)
33 (define-coding-system-alias 'iso-2022-7
'junet
)
37 "Coding-system of Shift-JIS used in Japan." t
)
39 (define-coding-system-alias 'shift_jis
'sjis
)
42 'iso-2022-jp-1978-irv
2 ?J
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
))
47 (define-coding-system-alias 'iso-2022-jp-1978-irv
'old-jis
)
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
))
55 (define-coding-system-alias 'euc-japan-1990
'euc-japan
)
57 (register-input-method
58 "Japanese" '("quail-ja-hiragana" quail-use-package
"quail/japanese"))
59 (register-input-method
60 "Japanese" '("quail-ja" quail-use-package
"quail/japanese"))
62 (defun setup-japanese-environment ()
63 "Setup multilingual environment (MULE) for Japanese."
65 (setq coding-category-iso-8-2
'euc-japan-1990
)
68 '(coding-category-iso-7
69 coding-category-iso-8-2
71 coding-category-iso-8-1
72 coding-category-iso-else
73 coding-category-emacs-mule
))
75 (if (eq system-type
'ms-dos
)
77 (setq-default buffer-file-coding-system
'sjis
)
78 (set-terminal-coding-system 'sjis
)
79 (set-keyboard-coding-system 'sjis
)
80 (setq default-process-coding-system
'(sjis-dos . sjis-dos
)))
81 (setq-default buffer-file-coding-system
'iso-2022-jp
)
82 (set-terminal-coding-system 'iso-2022-jp
)
83 (set-keyboard-coding-system 'iso-2022-jp
))
85 (set-default-input-method "Japanese" "quail-ja")
87 (setq sendmail-coding-system
'iso-2022-jp
88 rmail-file-coding-system
'iso-2022-jp
)
91 (set-language-info-alist
92 "Japanese" '((setup-function . setup-japanese-environment
)
93 (tutorial .
"TUTORIAL.jp")
94 (charset .
(japanese-jisx0208 japanese-jisx0208-1978
95 japanese-jisx0212 latin-jisx0201
97 (coding-system .
(euc-japan-1990 sjis
98 iso-2022-jp iso-2022-jp-1978-irv
))
99 (sample-text .
"Japanese (\e$BF|K\8l\e(B) \e$B$3$s$K$A$O\e(B, \e(I:]FAJ\e(B")
100 (documentation . t
)))
102 ;;; japanese.el ends here