annotate lisp/language/japanese.el @ 207:e45d5e7c476e r20-4b2

Import from CVS: tag r20-4b2
author cvs
date Mon, 13 Aug 2007 10:03:52 +0200
parents acd284d43ca1
children 41ff10fd062f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
159
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
1 ;;; japanese.el --- Japanese support
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
2
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
197
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 159
diff changeset
4 ;; Licensed to the Free Software Foundation.
159
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
5 ;; Copyright (C) 1997 MORIOKA Tomohiko
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
6
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
7 ;; Keywords: multilingual, Japanese
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
8
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
9 ;; This file is part of XEmacs.
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
10
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
11 ;; XEmacs is free software; you can redistribute it and/or modify it
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
12 ;; under the terms of the GNU General Public License as published by
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
13 ;; the Free Software Foundation; either version 2, or (at your option)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
14 ;; any later version.
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
15
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
16 ;; XEmacs is distributed in the hope that it will be useful, but
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
19 ;; General Public License for more details.
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
20
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
22 ;; along with XEmacs; see the file COPYING. If not, write to the Free
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
23 ;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
24 ;; 02111-1307, USA.
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
25
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
26 ;;; Commentary:
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
27
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
28 ;; For Japanese, character sets JISX0201, JISX0208, JISX0212 are
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
29 ;; supported.
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
30
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
31 ;;; Code:
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
32
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
33 ;;; Syntax of Japanese characters.
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
34 (modify-syntax-entry 'katakana-jisx0201 "w")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
35 (modify-syntax-entry 'japanese-jisx0212 "w")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
36
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
37 (modify-syntax-entry 'japanese-jisx0208 "w")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
38 (loop for row in '(33 34 40)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
39 do (modify-syntax-entry `[japanese-jisx0208 ,row] "_"))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
40 (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)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
41 do (modify-syntax-entry char "w"))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
42 (modify-syntax-entry ?\$B!J(B "($B!K(B")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
43 (modify-syntax-entry ?\$B!N(B "($B!O(B")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
44 (modify-syntax-entry ?\$B!P(B "($B!Q(B")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
45 (modify-syntax-entry ?\$B!V(B "($B!W(B")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
46 (modify-syntax-entry ?\$B!X(B "($B!Y(B")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
47 (modify-syntax-entry ?\$B!K(B ")$B!J(B")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
48 (modify-syntax-entry ?\$B!O(B ")$B!N(B")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
49 (modify-syntax-entry ?\$B!Q(B ")$B!P(B")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
50 (modify-syntax-entry ?\$B!W(B ")$B!V(B")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
51 (modify-syntax-entry ?\$B!Y(B ")$B!X(B")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
52
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
53 ;;; Character categories S, A, H, K, G, Y, and C
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
54 (define-category ?S "Japanese 2-byte symbol character.")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
55 (modify-category-entry [japanese-jisx0208 33] ?S)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
56 (modify-category-entry [japanese-jisx0208 34] ?S)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
57 (modify-category-entry [japanese-jisx0208 40] ?S)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
58 (define-category ?A "Japanese 2-byte Alphanumeric character.")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
59 (modify-category-entry [japanese-jisx0208 35] ?A)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
60 (define-category ?H "Japanese 2-byte Hiragana character.")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
61 (modify-category-entry [japanese-jisx0208 36] ?H)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
62 (define-category ?K "Japanese 2-byte Katakana character.")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
63 (modify-category-entry [japanese-jisx0208 37] ?K)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
64 (define-category ?G "Japanese 2-byte Greek character.")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
65 (modify-category-entry [japanese-jisx0208 38] ?G)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
66 (define-category ?Y "Japanese 2-byte Cyrillic character.")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
67 (modify-category-entry [japanese-jisx0208 39] ?Y)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
68 (define-category ?C "Japanese 2-byte Kanji characters.")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
69 (loop for row from 48 to 126
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
70 do (modify-category-entry `[japanese-jisx0208 ,row] ?C))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
71 (loop for char in '(?$B!<(B ?$B!+(B ?$B!,(B)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
72 do (modify-category-entry char ?K)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
73 (modify-category-entry char ?H))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
74 (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)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
75 do (modify-category-entry char ?C))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
76 (modify-category-entry 'japanese-jisx0212 ?C)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
77
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
78 (defvar japanese-word-regexp
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
79 "\\cA+\\cH*\\|\\cK+\\cH*\\|\\cC+\\cH*\\|\\cH+\\|\\ck+\\|\\sw+"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
80 "Regular expression used to match a Japanese word.")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
81
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
82 (set-word-regexp japanese-word-regexp)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
83 (setq forward-word-regexp "\\w\\>")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
84 (setq backward-word-regexp "\\<\\w")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
85
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
86 ;;; Paragraph setting
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
87 (setq sentence-end
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
88 (concat
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
89 "\\("
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
90 "\\("
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
91 "[.?!][]\"')}]*"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
92 "\\|"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
93 "[$B!%!)!*(B][$B!O!I!G!K!Q!M!S!U!W!Y(B]*"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
94 "\\)"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
95 "\\($\\|\t\\| \\)"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
96 "\\|"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
97 "$B!#(B"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
98 "\\)"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
99 "[ \t\n]*"))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
100 (setq paragraph-start "^[ $B!!(B\t\n\f]")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
101 (setq paragraph-separate "^[ $B!!(B\t\f]*$")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
102
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
103 ;; EGG specific setup
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
104 (define-egg-environment 'japanese
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
105 "Japanese settings for egg."
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
106 (lambda ()
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
107 (when (not (featurep 'egg-jpn))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
108 (load "its/its-hira")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
109 (load "its/its-kata")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
110 (load "its/its-hankaku")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
111 (load "its/its-zenkaku")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
112 (setq its:*standard-modes*
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
113 (append
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
114 (list (its:get-mode-map "roma-kana")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
115 (its:get-mode-map "roma-kata")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
116 (its:get-mode-map "downcase")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
117 (its:get-mode-map "upcase")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
118 (its:get-mode-map "zenkaku-downcase")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
119 (its:get-mode-map "zenkaku-upcase"))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
120 its:*standard-modes*))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
121 (provide 'egg-jpn))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
122 (setq wnn-server-type 'jserver)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
123 (setq egg-default-startup-file "eggrc-wnn")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
124 (setq-default its:*current-map* (its:get-mode-map "roma-kana"))))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
125
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
126 ;; stuff for providing gramatic processing of Japanese text
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
127 ;; something like this should probably be created for all environments...
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
128
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
129 (defvar aletter (concat "\\(" ascii-char "\\|" kanji-char "\\)"))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
130 (defvar kanji-space-insertable (concat
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
131 "$B!"(B" aletter "\\|"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
132 "$B!#(B" aletter "\\|"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
133 aletter "$B!J(B" "\\|"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
134 "$B!K(B" aletter "\\|"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
135 ascii-alphanumeric kanji-kanji-char "\\|"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
136 kanji-kanji-char ascii-alphanumeric ))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
137
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
138 (defvar space-insertable (concat " " aletter "\\|" kanji-space-insertable)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
139 "Regexp for finding points that can have spaces inserted into them for justification")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
140
197
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 159
diff changeset
141 ;; (make-coding-system
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 159
diff changeset
142 ;; 'iso-2022-jp 2 ?J
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 159
diff changeset
143 ;; "ISO 2022 based 7bit encoding for Japanese (MIME:ISO-2022-JP)"
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 159
diff changeset
144 ;; '((ascii japanese-jisx0208-1978 japanese-jisx0208
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 159
diff changeset
145 ;; latin-jisx0201 japanese-jisx0212 katakana-jisx0201 t) nil nil nil
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 159
diff changeset
146 ;; short ascii-eol ascii-cntl seven))
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 159
diff changeset
147
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 159
diff changeset
148 ;; (define-coding-system-alias 'junet 'iso-2022-jp)
159
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
149
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
150 (make-coding-system
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
151 'iso-2022-jp 'iso2022
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
152 "Coding-system used for communication with mail and news in Japan."
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
153 '(charset-g0 ascii
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
154 short t
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
155 seven t
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
156 input-charset-conversion ((latin-jisx0201 ascii)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
157 (japanese-jisx0208-1978 japanese-jisx0208))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
158 mnemonic "MULE/7bit"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
159 ))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
160
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
161 (copy-coding-system 'iso-2022-jp 'junet)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
162
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
163 ;; (make-coding-system
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
164 ;; 'shift_jis 1 ?S
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
165 ;; "Coding-system of Shift-JIS used in Japan." t)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
166
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
167 (make-coding-system
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
168 'shift_jis 'shift-jis
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
169 "Coding-system of Shift-JIS used in Japan."
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
170 '(mnemonic "Ja/SJIS"))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
171
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
172 ;;(define-coding-system-alias 'shift_jis 'sjis)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
173
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
174 (copy-coding-system 'shift_jis 'sjis)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
175
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
176 ;; (make-coding-system
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
177 ;; 'iso-2022-jp-1978-irv 2 ?J
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
178 ;; "Coding-system used for old jis terminal."
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
179 ;; '((ascii t) nil nil nil
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
180 ;; short ascii-eol ascii-cntl seven nil nil use-roman use-oldjis))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
181
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
182 (make-coding-system
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
183 'iso-2022-jp-1978-irv 'iso2022
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
184 "Coding-system used for old JIS terminal."
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
185 '(charset-g0 ascii
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
186 short t
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
187 seven t
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
188 output-charset-conversion ((ascii latin-jisx0201)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
189 (japanese-jisx0208 japanese-jisx0208-1978))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
190 mnemonic "Ja-78/7bit"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
191 ))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
192
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
193 ;;(define-coding-system-alias 'iso-2022-jp-1978-irv 'old-jis)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
194
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
195 (copy-coding-system 'iso-2022-jp-1978-irv 'old-jis)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
196
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
197 ;; (make-coding-system
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
198 ;; 'euc-japan-1990 2 ?E
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
199 ;; "Coding-system of Japanese EUC (Extended Unix Code)."
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
200 ;; '(ascii japanese-jisx0208 katakana-jisx0201 japanese-jisx0212
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
201 ;; short ascii-eol ascii-cntl nil nil single-shift))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
202
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
203 (make-coding-system
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
204 'euc-jp 'iso2022
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
205 "Coding-system of Japanese EUC (Extended Unix Code)."
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
206 '(charset-g0 ascii
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
207 charset-g1 japanese-jisx0208
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
208 charset-g2 katakana-jisx0201
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
209 charset-g3 japanese-jisx0212
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
210 short t
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
211 mnemonic "Ja/EUC"
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
212 ))
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
213
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
214 ;;(define-coding-system-alias 'euc-japan-1990 'euc-japan)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
215
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
216 (copy-coding-system 'euc-jp 'euc-japan) ; only for w3
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
217 (copy-coding-system 'euc-jp 'japanese-euc)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
218
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
219 (set-language-info-alist
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
220 "Japanese" '((setup-function . setup-japanese-environment)
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
221 (tutorial . "TUTORIAL.jp")
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
222 (charset . (japanese-jisx0208 japanese-jisx0208-1978
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
223 japanese-jisx0212 latin-jisx0201
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
224 katakana-jisx0201))
197
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 159
diff changeset
225 (coding-system . (iso-2022-jp euc-jp
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 159
diff changeset
226 shift_jis iso-2022-jp-1978-irv))
159
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
227 (sample-text . "Japanese ($BF|K\8l(B) $B$3$s$K$A$O(B, (I:]FAJ(B")
197
acd284d43ca1 Import from CVS: tag r20-3b25
cvs
parents: 159
diff changeset
228 (documentation . t)))
159
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
229
3bb7ccffb0c0 Import from CVS: tag r20-3b6
cvs
parents:
diff changeset
230 ;;; japanese.el ends here