1
by Tatsuya Kinoshita
Import upstream version 4.0.65 |
1 |
;;-*-coding:iso-2022-7bit;-*-
|
2 |
;;; mew-lang-jp.el --- Japanese specific stuff for Mew
|
|
3 |
||
4 |
;; Author: Mito <mit@nines.nec.co.jp>
|
|
5 |
;; Kazu Yamamoto <Kazu@Mew.org>
|
|
6 |
;; Created: Sep 08, 1997
|
|
7 |
||
8 |
;;; Code:
|
|
9 |
||
10 |
;; from jisx0201.el
|
|
11 |
(defvar mew-katakana-alist |
|
12 |
'(( 161 . "(I'(B" ) |
|
13 |
( 162 . "(I1(B" ) |
|
14 |
( 163 . "(I((B" ) |
|
15 |
( 164 . "(I2(B" ) |
|
16 |
( 165 . "(I)(B" ) |
|
17 |
( 166 . "(I3(B" ) |
|
18 |
( 167 . "(I*(B" ) |
|
19 |
( 168 . "(I4(B" ) |
|
20 |
( 169 . "(I+(B" ) |
|
21 |
( 170 . "(I5(B" ) |
|
22 |
( 171 . "(I6(B" ) |
|
23 |
( 172 . "(I6^(B" ) |
|
24 |
( 173 . "(I7(B" ) |
|
25 |
( 174 . "(I7^(B" ) |
|
26 |
( 175 . "(I8(B" ) |
|
27 |
( 176 . "(I8^(B" ) |
|
28 |
( 177 . "(I9(B" ) |
|
29 |
( 178 . "(I9^(B" ) |
|
30 |
( 179 . "(I:(B" ) |
|
31 |
( 180 . "(I:^(B" ) |
|
32 |
( 181 . "(I;(B" ) |
|
33 |
( 182 . "(I;^(B" ) |
|
34 |
( 183 . "(I<(B" ) |
|
35 |
( 184 . "(I<^(B" ) |
|
36 |
( 185 . "(I=(B" ) |
|
37 |
( 186 . "(I=^(B" ) |
|
38 |
( 187 . "(I>(B" ) |
|
39 |
( 188 . "(I>^(B" ) |
|
40 |
( 189 . "(I?(B" ) |
|
41 |
( 190 . "(I?^(B" ) |
|
42 |
( 191 . "(I@(B" ) |
|
43 |
( 192 . "(I@^(B" ) |
|
44 |
( 193 . "(IA(B" ) |
|
45 |
( 194 . "(IA^(B" ) |
|
46 |
( 195 . "(I/(B" ) |
|
47 |
( 196 . "(IB(B" ) |
|
48 |
( 197 . "(IB^(B" ) |
|
49 |
( 198 . "(IC(B" ) |
|
50 |
( 199 . "(IC^(B" ) |
|
51 |
( 200 . "(ID(B" ) |
|
52 |
( 201 . "(ID^(B" ) |
|
53 |
( 202 . "(IE(B" ) |
|
54 |
( 203 . "(IF(B" ) |
|
55 |
( 204 . "(IG(B" ) |
|
56 |
( 205 . "(IH(B" ) |
|
57 |
( 206 . "(II(B" ) |
|
58 |
( 207 . "(IJ(B" ) |
|
59 |
( 208 . "(IJ^(B" ) |
|
60 |
( 209 . "(IJ_(B" ) |
|
61 |
( 210 . "(IK(B" ) |
|
62 |
( 211 . "(IK^(B" ) |
|
63 |
( 212 . "(IK_(B" ) |
|
64 |
( 213 . "(IL(B" ) |
|
65 |
( 214 . "(IL^(B" ) |
|
66 |
( 215 . "(IL_(B" ) |
|
67 |
( 216 . "(IM(B" ) |
|
68 |
( 217 . "(IM^(B" ) |
|
69 |
( 218 . "(IM_(B" ) |
|
70 |
( 219 . "(IN(B" ) |
|
71 |
( 220 . "(IN^(B" ) |
|
72 |
( 221 . "(IN_(B" ) |
|
73 |
( 222 . "(IO(B" ) |
|
74 |
( 223 . "(IP(B" ) |
|
75 |
( 224 . "(IQ(B" ) |
|
76 |
( 225 . "(IR(B" ) |
|
77 |
( 226 . "(IS(B" ) |
|
78 |
( 227 . "(I,(B" ) |
|
79 |
( 228 . "(IT(B" ) |
|
80 |
( 229 . "(I-(B" ) |
|
81 |
( 230 . "(IU(B" ) |
|
82 |
( 231 . "(I.(B" ) |
|
83 |
( 232 . "(IV(B" ) |
|
84 |
( 233 . "(IW(B" ) |
|
85 |
( 234 . "(IX(B" ) |
|
86 |
( 235 . "(IY(B" ) |
|
87 |
( 236 . "(IZ(B" ) |
|
88 |
( 237 . "(I[(B" ) |
|
89 |
( 239 . "(I\(B" ) ; (I\(B -> $B%o(B $B$KJQ49$9$k$h$&$K(B |
|
90 |
( 238 . "(I\(B" ) ; $B%o$H%n$N=gHV$,8r49$7$F$"$k!#(B |
|
91 |
( 240 . "(I((B" ) |
|
92 |
( 241 . "(I*(B" ) |
|
93 |
( 242 . "(I&(B" ) |
|
94 |
( 243 . "(I](B" ) |
|
95 |
( 244 . "(I3^(B" ) |
|
96 |
( 245 . "(I6(B" ) |
|
97 |
( 246 . "(I9(B" ))) |
|
98 |
||
99 |
(defvar mew-katakana-kigou-alist |
|
100 |
'(( 162 . "(I$(B" ) |
|
101 |
( 163 . "(I!(B" ) |
|
102 |
( 166 . "(I%(B" ) |
|
103 |
( 171 . "(I^(B" ) |
|
104 |
( 172 . "(I_(B" ) |
|
105 |
( 188 . "(I0(B" ) |
|
106 |
( 214 . "(I"(B" ) |
|
107 |
( 215 . "(I#(B" ))) |
|
108 |
||
109 |
(defvar mew-dakuon-list
|
|
110 |
'( ?$B%+(B ?$B%-(B ?$B%/(B ?$B%1(B ?$B%3(B
|
|
111 |
?$B%5(B ?$B%7(B ?$B%9(B ?$B%;(B ?$B%=(B
|
|
112 |
?$B%?(B ?$B%A(B ?$B%D(B ?$B%F(B ?$B%H(B
|
|
113 |
?$B%O(B ?$B%R(B ?$B%U(B ?$B%X(B ?$B%[(B))
|
|
114 |
||
115 |
(defvar mew-handakuon-list (memq ?$B%O(B mew-dakuon-list))
|
|
116 |
||
1.1.12
by Tatsuya Kinoshita
Import upstream version 6.0.51~0.20080421 |
117 |
(defun mew-hankaku-code (ch)
|
118 |
(let* ((str (char-to-string ch))
|
|
119 |
(ent (rassoc str mew-katakana-alist)))
|
|
120 |
(if ent (car ent))))
|
|
121 |
|
|
1
by Tatsuya Kinoshita
Import upstream version 4.0.65 |
122 |
(defun mew-zenkaku-katakana-region (beg end)
|
123 |
(let (ch wk)
|
|
124 |
(save-restriction
|
|
125 |
(narrow-to-region beg end)
|
|
126 |
(save-excursion
|
|
127 |
(goto-char (point-min))
|
|
128 |
(while (re-search-forward "\\ck" nil t) |
|
129 |
(setq ch (preceding-char))
|
|
130 |
(setq wk nil)
|
|
131 |
(cond
|
|
132 |
((= ch ?(I^(B)
|
|
133 |
(save-excursion
|
|
134 |
(backward-char 1)
|
|
135 |
(setq wk (preceding-char)))
|
|
1.1.12
by Tatsuya Kinoshita
Import upstream version 6.0.51~0.20080421 |
136 |
(cond
|
137 |
((= wk ?$B%&(B)
|
|
138 |
(delete-char -2)
|
|
139 |
(insert "$B%t(B")) |
|
140 |
((setq wk (memq wk mew-dakuon-list))
|
|
141 |
(delete-char -2)
|
|
142 |
(insert (1+ (car wk))))
|
|
143 |
(t
|
|
144 |
(delete-char -1)
|
|
145 |
(insert "$B!+(B")))) |
|
1
by Tatsuya Kinoshita
Import upstream version 4.0.65 |
146 |
((= ch ?(I_(B)
|
147 |
(save-excursion
|
|
148 |
(backward-char 1)
|
|
149 |
(setq wk (preceding-char)))
|
|
150 |
(if (setq wk (memq wk mew-handakuon-list))
|
|
151 |
(progn
|
|
152 |
(delete-char -2)
|
|
153 |
(insert (+ 2 (car wk))))
|
|
1.1.12
by Tatsuya Kinoshita
Import upstream version 6.0.51~0.20080421 |
154 |
(delete-char -1)
|
155 |
(insert "$B!,(B"))) |
|
156 |
((setq wk (mew-hankaku-code ch))
|
|
157 |
(delete-char -1)
|
|
158 |
(insert (make-char mew-lc-jp ?\245 wk)))
|
|
159 |
((setq wk (mew-hankaku-code ch))
|
|
160 |
(delete-char -1)
|
|
161 |
(insert (make-char mew-lc-jp ?\241 wk)))))))))
|
|
1
by Tatsuya Kinoshita
Import upstream version 4.0.65 |
162 |
|
163 |
;;
|
|
164 |
||
165 |
(defvar mew-thread-indent-strings ["$B(2(B" "$B(1(B" "$B(-(B" "$B!!(B"]) |
|
166 |
||
167 |
(defvar mew-highlight-body-regex-cite
|
|
1.2.3
by Tatsuya Kinoshita
Import upstream version 6.2.51 |
168 |
"^\\(\\([ \t]\\{,7\\}\\([>:|$B!S!d!U"d!'!C(B]\\|\\w+\\([._-]+\\w+\\)*>+\\)\\)+\\).*") |
1
by Tatsuya Kinoshita
Import upstream version 4.0.65 |
169 |
|
170 |
(provide 'mew-lang-jp) |
|
171 |
||
172 |
;;; Copyright Notice:
|
|
173 |
||
1.2.5
by Tatsuya Kinoshita
Import upstream version 7.0.50~0.20100105 |
174 |
;; Copyright (C) 1997-2010 Mew developing team.
|
1
by Tatsuya Kinoshita
Import upstream version 4.0.65 |
175 |
;; All rights reserved.
|
176 |
||
177 |
;; Redistribution and use in source and binary forms, with or without
|
|
178 |
;; modification, are permitted provided that the following conditions
|
|
179 |
;; are met:
|
|
1.1.12
by Tatsuya Kinoshita
Import upstream version 6.0.51~0.20080421 |
180 |
;;
|
1
by Tatsuya Kinoshita
Import upstream version 4.0.65 |
181 |
;; 1. Redistributions of source code must retain the above copyright
|
182 |
;; notice, this list of conditions and the following disclaimer.
|
|
183 |
;; 2. Redistributions in binary form must reproduce the above copyright
|
|
184 |
;; notice, this list of conditions and the following disclaimer in the
|
|
185 |
;; documentation and/or other materials provided with the distribution.
|
|
186 |
;; 3. Neither the name of the team nor the names of its contributors
|
|
187 |
;; may be used to endorse or promote products derived from this software
|
|
188 |
;; without specific prior written permission.
|
|
1.1.12
by Tatsuya Kinoshita
Import upstream version 6.0.51~0.20080421 |
189 |
;;
|
1
by Tatsuya Kinoshita
Import upstream version 4.0.65 |
190 |
;; THIS SOFTWARE IS PROVIDED BY THE TEAM AND CONTRIBUTORS ``AS IS'' AND
|
191 |
;; ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
192 |
;; IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
193 |
;; PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE TEAM OR CONTRIBUTORS BE
|
|
194 |
;; LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
195 |
;; CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
196 |
;; SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
|
|
197 |
;; BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
198 |
;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
|
199 |
;; OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
|
|
200 |
;; IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
201 |
||
202 |
;;; mew-lang-jp.el ends here
|