Mercurial > emacs
comparison lisp/language/japanese.el @ 17052:d0d7b244b1d0
Initial revision
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Thu, 20 Feb 1997 07:02:49 +0000 |
parents | |
children | 70194012fb3a |
comparison
equal
deleted
inserted
replaced
17051:fd0b17a79b07 | 17052:d0d7b244b1d0 |
---|---|
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 | |
21 ;; along with GNU Emacs; see the file COPYING. If not, write to | |
22 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
23 | |
24 ;;; Commentary: | |
25 | |
26 ;; For Japanese, character sets JISX0201, JISX0208, JISX0212 are | |
27 ;; supported. | |
28 | |
29 ;;; Code: | |
30 | |
31 (make-coding-system | |
32 'coding-system-sjis 1 ?S | |
33 "Coding-system of Shift-JIS used in Japan." t) | |
34 | |
35 ;; ISO-2022-JP and JUNET are aliases for ISO-2022-7. | |
36 (put 'coding-system-iso-2022-jp 'coding-system 'coding-system-iso-2022-7) | |
37 (put 'coding-system-junet 'coding-system 'coding-system-iso-2022-7) | |
38 | |
39 (make-coding-system | |
40 'coding-system-old-jis 2 ?J | |
41 "Coding-system used for old jis terminal." | |
42 '((ascii t) nil nil nil | |
43 short ascii-eol ascii-cntl seven nil nil use-roman use-oldjis)) | |
44 | |
45 (make-coding-system | |
46 'coding-system-euc-japan 2 ?E | |
47 "Coding-system of Japanese EUC (Extended Unix Code)." | |
48 '(ascii japanese-jisx0208 katakana-jisx0201 japanese-jisx0212 | |
49 short ascii-eol ascii-cntl nil nil single-shift)) | |
50 | |
51 (register-input-method | |
52 "Japanese" '("quail-ja" quail-use-package "quail/japanese")) | |
53 | |
54 (register-input-method | |
55 "Japanese" '("quail-ja-hiragana" quail-use-package "quail/japanese")) | |
56 | |
57 (defun setup-japanese-environment () | |
58 (interactive) | |
59 (setq coding-category-iso-8-2 'coding-system-euc-japan) | |
60 | |
61 (set-coding-priority | |
62 '(coding-category-iso-7 | |
63 coding-category-iso-8-2 | |
64 coding-category-sjis | |
65 coding-category-iso-8-1 | |
66 coding-category-iso-else | |
67 coding-category-internal)) | |
68 | |
69 (if (eq system-type 'ms-dos) | |
70 (progn | |
71 (setq-default buffer-file-coding-system 'coding-system-sjis) | |
72 (set-terminal-coding-system 'coding-system-sjis) | |
73 (set-keyboard-coding-system 'coding-system-sjis) | |
74 (setq default-process-coding-system | |
75 '(coding-system-sjis-dos . coding-system-sjis-dos))) | |
76 (setq-default buffer-file-coding-system 'coding-system-iso-2022-jp) | |
77 (set-terminal-coding-system 'coding-system-iso-2022-jp) | |
78 (set-keyboard-coding-system 'coding-system-iso-2022-jp)) | |
79 | |
80 (set-default-input-method "Japanese" "quail-ja") | |
81 ) | |
82 | |
83 (set-language-info-alist | |
84 "Japanese" '((setup-function . setup-japanese-environment) | |
85 (tutorial . "TUTORIAL.jp") | |
86 (charset . (japanese-jisx0208 japanese-jisx0208-1978 | |
87 japanese-jisx0212 latin-jisx0201 | |
88 katakana-jisx0201)) | |
89 (coding-system . (coding-system-euc-japan | |
90 coding-system-sjis | |
91 coding-system-old-jis | |
92 coding-system-iso-2022-jp)) | |
93 (documentation . t) | |
94 (sample-text . "Japanese ($BF|K\8l(B) $B$3$s$K$A$O(B, (I:]FAJ(B"))) | |
95 | |
96 ;;; japanese.el ends here |