Mercurial > emacs
annotate lisp/language/japan-util.el @ 20376:67f1753dc577
(message): Declare a as char *[3].
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Fri, 28 Nov 1997 14:34:52 +0000 |
parents | c6f58c509273 |
children | f510736ce3d1 |
rev | line source |
---|---|
17315
a3ca5e15c82a
Fix the format of the first line.
Kenichi Handa <handa@m17n.org>
parents:
17071
diff
changeset
|
1 ;;; japan-util.el --- utilities for Japanese |
17052 | 2 |
3 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN. | |
18377
8b4a66c66dd6
Change copyright notice.
Richard M. Stallman <rms@gnu.org>
parents:
18309
diff
changeset
|
4 ;; Licensed to the Free Software Foundation. |
17052 | 5 |
6 ;; Keywords: mule, 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 | |
17071 | 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. | |
17052 | 24 |
25 ;;; Code: | |
26 | |
17993
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
27 ;;;###autoload |
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
28 (defun setup-japanese-environment () |
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
29 "Setup multilingual environment (MULE) for Japanese." |
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
30 (interactive) |
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
31 (setup-english-environment) |
19137
f8aebb949291
(setup-japanese-environment): Do not
Kenichi Handa <handa@m17n.org>
parents:
19088
diff
changeset
|
32 |
18203
0745f30aec66
Adjusted for coding system name change.
Kenichi Handa <handa@m17n.org>
parents:
17993
diff
changeset
|
33 (setq coding-category-iso-8-2 'japanese-iso-8bit) |
19764
427a68b553db
(setup-japanese-environment): Set
Kenichi Handa <handa@m17n.org>
parents:
19368
diff
changeset
|
34 (setq coding-category-iso-8-else 'japanese-iso-8bit) |
17993
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
35 |
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
36 (set-coding-priority |
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
37 '(coding-category-iso-7 |
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
38 coding-category-iso-8-2 |
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
39 coding-category-sjis |
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
40 coding-category-iso-8-1 |
18790
5b263fdf71a2
(setup-japanese-environment): Adjusted for the change of coding
Kenichi Handa <handa@m17n.org>
parents:
18415
diff
changeset
|
41 coding-category-iso-7-else |
5b263fdf71a2
(setup-japanese-environment): Adjusted for the change of coding
Kenichi Handa <handa@m17n.org>
parents:
18415
diff
changeset
|
42 coding-category-iso-8-else |
17993
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
43 coding-category-emacs-mule)) |
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
44 |
19137
f8aebb949291
(setup-japanese-environment): Do not
Kenichi Handa <handa@m17n.org>
parents:
19088
diff
changeset
|
45 (set-default-coding-systems |
f8aebb949291
(setup-japanese-environment): Do not
Kenichi Handa <handa@m17n.org>
parents:
19088
diff
changeset
|
46 (if (eq system-type 'ms-dos) |
f8aebb949291
(setup-japanese-environment): Do not
Kenichi Handa <handa@m17n.org>
parents:
19088
diff
changeset
|
47 'japanese-shift-jis |
19854
c6f58c509273
(setup-japanese-environment): Give
Kenichi Handa <handa@m17n.org>
parents:
19764
diff
changeset
|
48 'iso-2022-jp)) |
17993
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
49 |
19368
63415fa4039d
(setup-japanese-environment): Delete
Kenichi Handa <handa@m17n.org>
parents:
19272
diff
changeset
|
50 (setq default-input-method "japanese")) |
17993
73869115ae0a
Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents:
17315
diff
changeset
|
51 |
17052 | 52 (defconst japanese-kana-table |
53 '((?$B$"(B ?$B%"(B ?(I1(B) (?$B$$(B ?$B%$(B ?(I2(B) (?$B$&(B ?$B%&(B ?(I3(B) (?$B$((B ?$B%((B ?(I4(B) (?$B$*(B ?$B%*(B ?(I5(B) | |
54 (?$B$+(B ?$B%+(B ?(I6(B) (?$B$-(B ?$B%-(B ?(I7(B) (?$B$/(B ?$B%/(B ?(I8(B) (?$B$1(B ?$B%1(B ?(I9(B) (?$B$3(B ?$B%3(B ?(I:(B) | |
55 (?$B$5(B ?$B%5(B ?(I;(B) (?$B$7(B ?$B%7(B ?(I<(B) (?$B$9(B ?$B%9(B ?(I=(B) (?$B$;(B ?$B%;(B ?(I>(B) (?$B$=(B ?$B%=(B ?(I?(B) | |
56 (?$B$?(B ?$B%?(B ?(I@(B) (?$B$A(B ?$B%A(B ?(IA(B) (?$B$D(B ?$B%D(B ?(IB(B) (?$B$F(B ?$B%F(B ?(IC(B) (?$B$H(B ?$B%H(B ?(ID(B) | |
57 (?$B$J(B ?$B%J(B ?(IE(B) (?$B$K(B ?$B%K(B ?(IF(B) (?$B$L(B ?$B%L(B ?(IG(B) (?$B$M(B ?$B%M(B ?(IH(B) (?$B$N(B ?$B%N(B ?(II(B) | |
58 (?$B$O(B ?$B%O(B ?(IJ(B) (?$B$R(B ?$B%R(B ?(IK(B) (?$B$U(B ?$B%U(B ?(IL(B) (?$B$X(B ?$B%X(B ?(IM(B) (?$B$[(B ?$B%[(B ?(IN(B) | |
59 (?$B$^(B ?$B%^(B ?(IO(B) (?$B$_(B ?$B%_(B ?(IP(B) (?$B$`(B ?$B%`(B ?(IQ(B) (?$B$a(B ?$B%a(B ?(IR(B) (?$B$b(B ?$B%b(B ?(IS(B) | |
60 (?$B$d(B ?$B%d(B ?(IT(B) (?$B$f(B ?$B%f(B ?(IU(B) (?$B$h(B ?$B%h(B ?(IV(B) | |
61 (?$B$i(B ?$B%i(B ?(IW(B) (?$B$j(B ?$B%j(B ?(IX(B) (?$B$k(B ?$B%k(B ?(IY(B) (?$B$l(B ?$B%l(B ?(IZ(B) (?$B$m(B ?$B%m(B ?(I[(B) | |
62 (?$B$o(B ?$B%o(B ?(I\(B) (?$B$p(B ?$B%p(B nil) (?$B$q(B ?$B%q(B nil) (?$B$r(B ?$B%r(B ?(I&(B) | |
63 (?$B$s(B ?$B%s(B ?(I](B) | |
64 (?$B$,(B ?$B%,(B "(I6^(B") (?$B$.(B ?$B%.(B "(I7^(B") (?$B$0(B ?$B%0(B "(I8^(B") (?$B$2(B ?$B%2(B "(I9^(B") (?$B$4(B ?$B%4(B "(I:^(B") | |
65 (?$B$6(B ?$B%6(B "(I;^(B") (?$B$8(B ?$B%8(B "(I<^(B") (?$B$:(B ?$B%:(B "(I=^(B") (?$B$<(B ?$B%<(B "(I>^(B") (?$B$>(B ?$B%>(B "(I?^(B") | |
66 (?$B$@(B ?$B%@(B "(I@^(B") (?$B$B(B ?$B%B(B "(IA^(B") (?$B$E(B ?$B%E(B "(IB^(B") (?$B$G(B ?$B%G(B "(IC^(B") (?$B$I(B ?$B%I(B "(ID^(B") | |
67 (?$B$P(B ?$B%P(B "(IJ^(B") (?$B$S(B ?$B%S(B "(IK^(B") (?$B$V(B ?$B%V(B "(IL^(B") (?$B$Y(B ?$B%Y(B "(IM^(B") (?$B$\(B ?$B%\(B "(IN^(B") | |
68 (?$B$Q(B ?$B%Q(B "(IJ_(B") (?$B$T(B ?$B%T(B "(IK_(B") (?$B$W(B ?$B%W(B "(IL_(B") (?$B$Z(B ?$B%Z(B "(IM_(B") (?$B$](B ?$B%](B "(IN_(B") | |
69 (?$B$!(B ?$B%!(B ?(I'(B) (?$B$#(B ?$B%#(B ?(I((B) (?$B$%(B ?$B%%(B ?(I)(B) (?$B$'(B ?$B%'(B ?(I*(B) (?$B$)(B ?$B%)(B ?(I+(B) | |
70 (?$B$C(B ?$B%C(B ?(I/(B) | |
71 (?$B$c(B ?$B%c(B ?(I,(B) (?$B$e(B ?$B%e(B ?(I-(B) (?$B$g(B ?$B%g(B ?(I.(B) | |
72 (?$B$n(B ?$B%n(B nil) | |
73 (nil ?$B%t(B "(I3^(B") (nil ?$B%u(B nil) (nil ?$B%v(B nil)) | |
74 "Japanese JISX0208 Kana character table. | |
75 Each element is of the form (HIRAGANA KATAKANA HANKAKU-KATAKANA), where | |
76 HIRAGANA and KATAKANA belong to `japanese-jisx0208', | |
77 HANKAKU-KATAKANA belongs to `japanese-jisx0201-kana'.") | |
78 | |
79 ;; Put properties 'katakana, 'hiragana, and 'jix0201 to each Japanese | |
80 ;; kana characters for conversion among them. | |
81 (let ((l japanese-kana-table) | |
82 slot hiragana katakana jisx0201) | |
83 (while l | |
84 (setq slot (car l) | |
85 hiragana (car slot) katakana (nth 1 slot) jisx0201 (nth 2 slot) | |
86 l (cdr l)) | |
87 (if hiragana | |
88 (progn | |
89 (put-char-code-property hiragana 'katakana katakana) | |
90 (put-char-code-property katakana 'hiragana hiragana) | |
91 (if jisx0201 | |
92 (progn | |
93 (put-char-code-property hiragana 'jisx0201 jisx0201) | |
94 (if (integerp jisx0201) | |
95 (put-char-code-property jisx0201 'hiragana hiragana)))))) | |
96 (if jisx0201 | |
97 (progn | |
98 (put-char-code-property katakana 'jisx0201 jisx0201) | |
99 (if (integerp jisx0201) | |
100 (put-char-code-property jisx0201 'katakana katakana)))))) | |
101 | |
102 (defconst japanese-symbol-table | |
103 '((?\$B!!(B ?\ ) (?$B!"(B ?, ?(I$(B) (?$B!#(B ?. ?(I!(B) (?$B!$(B ?, ?(I$(B) (?$B!%(B ?. ?(I!(B) (?$B!&(B nil ?(I%(B) | |
104 (?$B!'(B ?:) (?$B!((B ?\;) (?$B!)(B ??) (?$B!*(B ?!) (?$B!+(B nil ?(I^(B) (?$B!,(B nil ?(I_(B) | |
105 (?$B!-(B ?') (?$B!.(B ?`) (?$B!0(B ?^) (?$B!2(B ?_) (?$B!<(B ?-) (?$B!=(B ?-) (?$B!>(B ?-) | |
106 (?$B!?(B ?/) (?$B!@(B ?\\) (?$B!A(B ?~) (?$B!C(B ?|) (?$B!F(B ?`) (?$B!G(B ?') (?$B!H(B ?\") (?$B!I(B ?\") | |
107 (?\$B!J(B ?\() (?\$B!K(B ?\)) (?\$B!N(B ?[) (?\$B!O(B ?]) (?\$B!P(B ?{) (?\$B!Q(B ?}) | |
108 (?$B!R(B ?<) (?$B!S(B ?>) (?$B!\(B ?+) (?$B!](B ?-) (?$B!a(B ?=) (?$B!c(B ?<) (?$B!d(B ?>) | |
109 (?$B!l(B ?') (?$B!m(B ?\") (?$B!o(B ?\\) (?$B!p(B ?$) (?$B!s(B ?%) (?$B!t(B ?#) (?$B!u(B ?&) (?$B!v(B ?*) | |
110 (?$B!w(B ?@)) | |
111 "Japanese JISX0208 symbol character table. | |
112 Each element is of the form (SYMBOL ASCII HANKAKU), where SYMBOL | |
113 belongs to `japanese-jisx0208', ASCII belongs to `ascii', and HANKAKU | |
114 belongs to `japanese-jisx0201-kana'.") | |
115 | |
116 ;; Put properties 'jisx0208, 'jisx0201, and 'ascii to each Japanese | |
117 ;; symbol and ASCII characters for conversion among them. | |
118 (let ((l japanese-symbol-table) | |
119 slot jisx0208 ascii jisx0201) | |
120 (while l | |
121 (setq slot (car l) | |
122 jisx0208 (car slot) ascii (nth 1 slot) jisx0201 (nth 2 slot) | |
123 l (cdr l)) | |
124 (if ascii | |
125 (progn | |
126 (put-char-code-property jisx0208 'ascii ascii) | |
127 (put-char-code-property ascii 'jisx0208 jisx0208))) | |
128 (if jisx0201 | |
129 (progn | |
130 (put-char-code-property jisx0208 'jisx0201 jisx0201) | |
131 (put-char-code-property jisx0201 'jisx0208 jisx0208))))) | |
132 | |
133 (defconst japanese-alpha-numeric-table | |
134 '((?$B#0(B . ?0) (?$B#1(B . ?1) (?$B#2(B . ?2) (?$B#3(B . ?3) (?$B#4(B . ?4) | |
135 (?$B#5(B . ?5) (?$B#6(B . ?6) (?$B#7(B . ?7) (?$B#8(B . ?8) (?$B#9(B . ?9) | |
136 (?$B#A(B . ?A) (?$B#B(B . ?B) (?$B#C(B . ?C) (?$B#D(B . ?D) (?$B#E(B . ?E) | |
137 (?$B#F(B . ?F) (?$B#G(B . ?G) (?$B#H(B . ?H) (?$B#I(B . ?I) (?$B#J(B . ?J) | |
138 (?$B#K(B . ?K) (?$B#L(B . ?L) (?$B#M(B . ?M) (?$B#N(B . ?N) (?$B#O(B . ?O) | |
139 (?$B#P(B . ?P) (?$B#Q(B . ?Q) (?$B#R(B . ?R) (?$B#S(B . ?S) (?$B#T(B . ?T) | |
140 (?$B#U(B . ?U) (?$B#V(B . ?V) (?$B#W(B . ?W) (?$B#X(B . ?X) (?$B#Y(B . ?Y) (?$B#Z(B . ?Z) | |
141 (?$B#a(B . ?a) (?$B#b(B . ?b) (?$B#c(B . ?c) (?$B#d(B . ?d) (?$B#e(B . ?e) | |
142 (?$B#f(B . ?f) (?$B#g(B . ?g) (?$B#h(B . ?h) (?$B#i(B . ?i) (?$B#j(B . ?j) | |
143 (?$B#k(B . ?k) (?$B#l(B . ?l) (?$B#m(B . ?m) (?$B#n(B . ?n) (?$B#o(B . ?o) | |
144 (?$B#p(B . ?p) (?$B#q(B . ?q) (?$B#r(B . ?r) (?$B#s(B . ?s) (?$B#t(B . ?t) | |
145 (?$B#u(B . ?u) (?$B#v(B . ?v) (?$B#w(B . ?w) (?$B#x(B . ?x) (?$B#y(B . ?y) (?$B#z(B . ?z)) | |
146 "Japanese JISX0208 alpha numeric character table. | |
147 Each element is of the form (ALPHA-NUMERIC ASCII), where ALPHA-NUMERIC | |
148 belongs to `japanese-jisx0208', ASCII belongs to `ascii'.") | |
149 | |
150 ;; Put properties 'jisx0208 and 'ascii to each Japanese alpha numeric | |
151 ;; and ASCII characters for conversion between them. | |
152 (let ((l japanese-alpha-numeric-table) | |
153 slot jisx0208 ascii) | |
154 (while l | |
155 (setq slot (car l) | |
156 jisx0208 (car slot) ascii (cdr slot) | |
157 l (cdr l)) | |
158 (put-char-code-property jisx0208 'ascii ascii) | |
159 (put-char-code-property ascii 'jisx0208 jisx0208))) | |
160 | |
161 ;; Convert string STR by FUNC and return a resulting string. | |
162 (defun japanese-string-conversion (str func &rest args) | |
163 (let ((buf (get-buffer-create " *Japanese work*"))) | |
164 (save-excursion | |
165 (set-buffer buf) | |
166 (erase-buffer) | |
167 (insert str) | |
168 (apply func 1 (point) args) | |
169 (buffer-string)))) | |
170 | |
171 ;;;###autoload | |
172 (defun japanese-katakana (obj &optional hankaku) | |
173 "Convert argument to Katakana and return that. | |
174 The argument may be a character or string. The result has the same type. | |
175 The argument object is not altered--the value is a copy. | |
176 Optional argument HANKAKU t means to convert to `hankaku' Katakana | |
177 \(`japanese-jisx0201-kana'), in which case return value | |
178 may be a string even if OBJ is a character if two Katakanas are | |
179 necessary to represent OBJ." | |
180 (if (stringp obj) | |
181 (japanese-string-conversion obj 'japanese-katakana-region hankaku) | |
182 (or (get-char-code-property obj (if hankaku 'jisx0201 'katakana)) | |
183 obj))) | |
184 | |
185 ;;;###autoload | |
186 (defun japanese-hiragana (obj) | |
187 "Convert argument to Hiragana and return that. | |
188 The argument may be a character or string. The result has the same type. | |
189 The argument object is not altered--the value is a copy." | |
190 (if (stringp obj) | |
191 (japanese-string-conversion obj 'japanese-hiragana-region) | |
192 (or (get-char-code-property obj 'hiragana) | |
193 obj))) | |
194 | |
195 ;;;###autoload | |
196 (defun japanese-hankaku (obj &optional ascii-only) | |
197 "Convert argument to `hankaku' and return that. | |
198 The argument may be a character or string. The result has the same type. | |
199 The argument object is not altered--the value is a copy. | |
200 Optional argument ASCII-ONLY non-nil means to return only ASCII character." | |
201 (if (stringp obj) | |
202 (japanese-string-conversion obj 'japanese-hankaku-region ascii-only) | |
203 (or (get-char-code-property obj 'ascii) | |
204 (and (not ascii-only) | |
205 (get-char-code-property obj 'jisx0201)) | |
206 obj))) | |
207 | |
208 ;;;###autoload | |
209 (defun japanese-zenkaku (obj) | |
210 "Convert argument to `zenkaku' and return that. | |
211 The argument may be a character or string. The result has the same type. | |
212 The argument object is not altered--the value is a copy." | |
213 (if (stringp obj) | |
214 (japanese-string-conversion obj 'japanese-zenkaku-region) | |
215 (or (get-char-code-property obj 'jisx0208) | |
216 obj))) | |
217 | |
218 ;;;###autoload | |
219 (defun japanese-katakana-region (from to &optional hankaku) | |
220 "Convert Japanese `hiragana' chars in the region to `katakana' chars. | |
221 Optional argument HANKAKU t means to convert to `hankaku katakana' character | |
222 of which charset is `japanese-jisx0201-kana'." | |
223 (interactive "r\nP") | |
224 (save-restriction | |
225 (narrow-to-region from to) | |
226 (goto-char (point-min)) | |
227 (while (re-search-forward "\\cH\\|\\cK" nil t) | |
228 (let* ((hira (preceding-char)) | |
229 (kata (japanese-katakana hira hankaku))) | |
230 (if kata | |
231 (progn | |
232 (delete-region (match-beginning 0) (match-end 0)) | |
233 (insert kata))))))) | |
234 | |
235 ;;;###autoload | |
236 (defun japanese-hiragana-region (from to) | |
237 "Convert Japanese `katakana' chars in the region to `hiragana' chars." | |
238 (interactive "r") | |
239 (save-restriction | |
240 (narrow-to-region from to) | |
241 (goto-char (point-min)) | |
242 (while (re-search-forward "\\cK\\|\\ck" nil t) | |
243 (let* ((kata (preceding-char)) | |
244 (hira (japanese-hiragana kata))) | |
245 (if hira | |
246 (progn | |
247 (delete-region (match-beginning 0) (match-end 0)) | |
248 (insert hira))))))) | |
249 | |
250 ;;;###autoload | |
251 (defun japanese-hankaku-region (from to &optional ascii-only) | |
252 "Convert Japanese `zenkaku' chars in the region to `hankaku' chars. | |
253 `Zenkaku' chars belong to `japanese-jisx0208' | |
254 `Hankaku' chars belong to `ascii' or `japanese-jisx0201-kana'. | |
255 Optional argument ASCII-ONLY non-nil means to convert only to ASCII char." | |
256 (interactive "r\nP") | |
257 (save-restriction | |
258 (narrow-to-region from to) | |
259 (goto-char (point-min)) | |
260 (while (re-search-forward "\\cj" nil t) | |
261 (let* ((zenkaku (preceding-char)) | |
262 (hankaku (japanese-hankaku zenkaku ascii-only))) | |
263 (if hankaku | |
264 (progn | |
265 (delete-region (match-beginning 0) (match-end 0)) | |
266 (insert hankaku))))))) | |
267 | |
268 ;;;###autoload | |
269 (defun japanese-zenkaku-region (from to) | |
270 "Convert hankaku' chars in the region to Japanese `zenkaku' chars. | |
271 `Zenkaku' chars belong to `japanese-jisx0208' | |
272 `Hankaku' chars belong to `ascii' or `japanese-jisx0201-kana'." | |
273 (interactive "r") | |
274 (save-restriction | |
275 (narrow-to-region from to) | |
276 (goto-char (point-min)) | |
277 (while (re-search-forward "\\ca\\|\\ck" nil t) | |
278 (let* ((hankaku (preceding-char)) | |
279 (zenkaku (japanese-zenkaku hankaku))) | |
280 (if zenkaku | |
281 (progn | |
282 (delete-region (match-beginning 0) (match-end 0)) | |
283 (insert zenkaku))))))) | |
284 | |
285 ;;;###autoload | |
286 (defun read-hiragana-string (prompt &optional initial-input) | |
287 "Read a Hiragana string from the minibuffer, prompting with string PROMPT. | |
288 If non-nil, second arg INITIAL-INPUT is a string to insert before reading." | |
19854
c6f58c509273
(setup-japanese-environment): Give
Kenichi Handa <handa@m17n.org>
parents:
19764
diff
changeset
|
289 (read-multilingual-string prompt initial-input "japanese-hiragana")) |
17052 | 290 |
291 ;; | |
18309
bd8b521f5218
Provide XXX-util instead of
Kenichi Handa <handa@m17n.org>
parents:
18203
diff
changeset
|
292 (provide 'japan-util) |
17052 | 293 |
294 ;;; japan-util.el ends here |