annotate lisp/mule/japanese-hooks.el @ 74:54cc21c15cbb r20-0b32

Import from CVS: tag r20-0b32
author cvs
date Mon, 13 Aug 2007 09:04:33 +0200
parents 131b0175ea99
children 0d2f883870bc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
1 ;;; japanese-hooks.el --- pre-loaded support for Japanese.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
2
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
3 ;; Copyright (C) 1992,93,94,95 Free Software Foundation, Inc.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
4 ;; Copyright (C) 1995 Amdahl Corporation.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
5 ;; Copyright (C) 1995 Sun Microsystems.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
6
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
7 ;; This file is part of XEmacs.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
8
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
9 ;; XEmacs is free software; you can redistribute it and/or modify it
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
10 ;; under the terms of the GNU General Public License as published by
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
11 ;; the Free Software Foundation; either version 2, or (at your option)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
12 ;; any later version.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
13
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
14 ;; XEmacs is distributed in the hope that it will be useful, but
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
15 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
17 ;; General Public License for more details.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
18
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
19 ;; You should have received a copy of the GNU General Public License
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
20 ;; along with XEmacs; see the file COPYING. If not, write to the
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
21 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
22 ;; Boston, MA 02111-1307, USA.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
23
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
24 ;;; Synched up with: Mule 2.3.
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
25
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
26 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
27 ;;; JAPANESE
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
28 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
29
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
30 ;;; Syntax of Japanese characters.
74
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
31 (modify-syntax-entry 'katakana-jisx0201 "w")
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
32 (modify-syntax-entry 'japanese-jisx0212 "w")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
33
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
34 (modify-syntax-entry 'japanese-jisx0208 "w")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
35 (loop for row in '(33 34 40)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
36 do (modify-syntax-entry `[japanese-jisx0208 ,row] "_"))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
37 (loop for char in '(?$B!<(B ?$B!+(B ?$B!,(B ?$B!3(B ?$B!4(B ?$B!5(B ?$B!6(B ?$B!7(B ?$B!8(B ?$B!9(B ?$B!:(B ?$B!;(B)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
38 do (modify-syntax-entry char "w"))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
39 (modify-syntax-entry ?\$B!J(B "($B!K(B")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
40 (modify-syntax-entry ?\$B!N(B "($B!O(B")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
41 (modify-syntax-entry ?\$B!P(B "($B!Q(B")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
42 (modify-syntax-entry ?\$B!V(B "($B!W(B")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
43 (modify-syntax-entry ?\$B!X(B "($B!Y(B")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
44 (modify-syntax-entry ?\$B!K(B ")$B!J(B")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
45 (modify-syntax-entry ?\$B!O(B ")$B!N(B")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
46 (modify-syntax-entry ?\$B!Q(B ")$B!P(B")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
47 (modify-syntax-entry ?\$B!W(B ")$B!V(B")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
48 (modify-syntax-entry ?\$B!Y(B ")$B!X(B")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
49
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
50
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
51 ;;; Character categories S, A, H, K, G, Y, and C
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
52 (define-category ?S "Japanese 2-byte symbol character.")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
53 (modify-category-entry [japanese-jisx0208 33] ?S)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
54 (modify-category-entry [japanese-jisx0208 34] ?S)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
55 (modify-category-entry [japanese-jisx0208 40] ?S)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
56 (define-category ?A "Japanese 2-byte Alphanumeric character.")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
57 (modify-category-entry [japanese-jisx0208 35] ?A)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
58 (define-category ?H "Japanese 2-byte Hiragana character.")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
59 (modify-category-entry [japanese-jisx0208 36] ?H)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
60 (define-category ?K "Japanese 2-byte Katakana character.")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
61 (modify-category-entry [japanese-jisx0208 37] ?K)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
62 (define-category ?G "Japanese 2-byte Greek character.")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
63 (modify-category-entry [japanese-jisx0208 38] ?G)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
64 (define-category ?Y "Japanese 2-byte Cyrillic character.")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
65 (modify-category-entry [japanese-jisx0208 39] ?Y)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
66 (define-category ?C "Japanese 2-byte Kanji characters.")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
67 (loop for row from 48 to 126 do (modify-category-entry `[japanese-jisx0208 ,row] ?C))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
68 (loop for char in '(?$B!<(B ?$B!+(B ?$B!,(B)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
69 do (modify-category-entry char ?K)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
70 (modify-category-entry char ?H))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
71 (loop for char in '(?$B!3(B ?$B!4(B ?$B!5(B ?$B!6(B ?$B!7(B ?$B!8(B ?$B!9(B ?$B!:(B ?$B!;(B)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
72 do (modify-category-entry char ?C))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
73 (modify-category-entry 'japanese-jisx0212 ?C)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
74
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
75 (defvar japanese-word-regexp
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
76 "\\cA+\\cH*\\|\\cK+\\cH*\\|\\cC+\\cH*\\|\\cH+\\|\\ck+\\|\\sw+"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
77 "Regular expression used to match a Japanese word.")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
78
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
79 (set-word-regexp japanese-word-regexp)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
80 (setq forward-word-regexp "\\w\\>")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
81 (setq backward-word-regexp "\\<\\w")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
82
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
83 ;;; Paragraph setting
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
84 (setq sentence-end
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
85 (concat
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
86 "\\("
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
87 "\\("
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
88 "[.?!][]\"')}]*"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
89 "\\|"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
90 "[$B!%!)!*(B][$B!O!I!G!K!Q!M!S!U!W!Y(B]*"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
91 "\\)"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
92 "\\($\\|\t\\| \\)"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
93 "\\|"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
94 "$B!#(B"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
95 "\\)"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
96 "[ \t\n]*"))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
97 (setq paragraph-start "^[ $B!!(B\t\n\f]")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
98 (setq paragraph-separate "^[ $B!!(B\t\f]*$")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
99
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
100 ;; EGG specific setup
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
101 ;;(when (featurep 'egg)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
102 ;; (setq wnn-server-type 'jserver)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
103 ;; (load "its/hira")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
104 ;; (load "its/kata")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
105 ;; (load "its/hankaku")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
106 ;; (load "its/zenkaku")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
107 ;; (setq its:*standard-modes*
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
108 ;; (append
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
109 ;; (list (its:get-mode-map "roma-kana")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
110 ;; (its:get-mode-map "roma-kata")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
111 ;; (its:get-mode-map "downcase")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
112 ;; (its:get-mode-map "upcase")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
113 ;; (its:get-mode-map "zenkaku-downcase")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
114 ;; (its:get-mode-map "zenkaku-upcase"))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
115 ;; its:*standard-modes*)))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
116
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
117 (make-coding-system
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
118 'shift-jis 'shift-jis
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
119 "Coding-system of Shift-JIS used in Japan."
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
120 '(mnemonic "SJIS"))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
121
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
122 (copy-coding-system 'shift-jis 'sjis)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
123
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
124 (make-coding-system
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
125 'iso-2022-jp 'iso2022
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
126 "Coding-system used for communication with mail and news in Japan."
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
127 '(charset-g0 ascii
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
128 short t
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
129 seven t
74
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
130 input-charset-conversion ((latin-jisx0201 ascii)
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
131 (japanese-jisx0208-1978 japanese-jisx0208))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
132 mnemonic "Mail/Ja"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
133 ))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
134
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
135 (copy-coding-system 'iso-2022-jp 'junet)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
136
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
137 (make-coding-system
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
138 'oldjis 'iso2022
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
139 "Coding-system used for old JIS terminal."
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
140 '(charset-g0 ascii
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
141 short t
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
142 seven t
74
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
143 output-charset-conversion ((ascii latin-jisx0201)
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
144 (japanese-jisx0208 japanese-jisx0208-1978))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
145 mnemonic "Mail/Ja-old"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
146 ))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
147
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
148 (make-coding-system
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
149 'euc-japan 'iso2022
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
150 "Coding-system of Japanese EUC (Extended Unix Code)."
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
151 '(charset-g0 ascii
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
152 charset-g1 japanese-jisx0208
74
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
153 charset-g2 katakana-jisx0201
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
154 charset-g3 japanese-jisx0212
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
155 short t
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
156 mnemonic "EUC/Ja"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
157 ))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
158
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
159 (define-language-environment 'japanese
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
160 "Japanese (includes JIS and EUC)"
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
161 (lambda ()
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
162 (set-coding-category-system 'iso-7 'iso-2022-jp)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
163 (set-coding-category-system 'iso-8-2 'euc-japan)
74
54cc21c15cbb Import from CVS: tag r20-0b32
cvs
parents: 70
diff changeset
164 (set-coding-priority-list '(iso-7 iso-8-2 shift-jis no-conversion))
70
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
165 ;;'(iso-8-2 iso-8-designate iso-8-1 shift-jis big5)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
166
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
167 ;;(when (featurep 'egg)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
168 ;; (setq-default its:*current-map* (its:get-mode-map "roma-kana")))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
169
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
170 ;; Added by mrb, who doesn't speak japanese - so be sceptical...
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
171 ;; (when (string-match "solaris\\|sunos" system-configuration)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
172 ;;(set-native-coding-system 'euc-japan) ; someday
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
173 (set-pathname-coding-system 'euc-japan)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
174 (add-hook 'comint-exec-hook
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
175 (lambda ()
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
176 (let ((proc (get-buffer-process (current-buffer))))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
177 (set-process-input-coding-system proc 'euc-japan)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
178 (set-process-output-coding-system proc 'euc-japan))))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
179 (set-file-coding-system-for-read 'autodetect)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
180 (set-default-file-coding-system 'euc-japan)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
181 (setq keyboard-coding-system 'euc-japan)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
182 (setq terminal-coding-system 'euc-japan)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
183 (set-charset-registry 'ascii "JISX0201")
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
184
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
185 (when (eq system-type 'ms-dos)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
186 ;; Shift-JIS is the standard coding system under Japanese MS-DOS
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
187 ;; This isn't really code - just a hint to future implementors
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
188 (setq keyboard-coding-system 'shift-jis-dos)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
189 (setq terminal-coding-system 'shift-jis-dos)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
190 (set-default-file-coding-system 'shift-jis-dos)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
191 ;;(set-default-process-coding-system 'shift-jis-dos 'shift-jis-dos)
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
192 )
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
193 ))
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
194
131b0175ea99 Import from CVS: tag r20-0b30
cvs
parents:
diff changeset
195 (set-coding-category-system 'shift-jis 'shift-jis)