114
|
1 ;;; egg-wnn.el --- a inputting method communicating with [jck]server
|
70
|
2
|
|
3 ;; Author: Satoru Tomura (tomura@etl.go.jp), and
|
|
4 ;; Toshiaki Shingu (shingu@cpr.canon.co.jp)
|
|
5 ;; Keywords: inputting method
|
|
6
|
|
7 ;; This file is part of Egg on Mule (Multilingual Environment)
|
|
8
|
|
9 ;; Egg is free software; you can redistribute it and/or modify
|
|
10 ;; it under the terms of the GNU General Public License as published by
|
|
11 ;; the Free Software Foundation; either version 2, or (at your option)
|
|
12 ;; any later version.
|
|
13
|
|
14 ;; Egg is distributed in the hope that it will be useful,
|
|
15 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17 ;; GNU General Public License for more details.
|
|
18
|
|
19 ;; You should have received a copy of the GNU General Public License
|
|
20 ;; along with GNU Emacs; see the file COPYING. If not, write to
|
|
21 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
22
|
|
23 ;;; Commentary:
|
|
24
|
|
25 ;;; Modified for Wnn V4 and Wnn6 by Satoru Tomura(tomura@etl.go.jp)
|
|
26 ;;; Modified for Wnn6 by OMRON
|
|
27 ;;; Written by Toshiaki Shingu (shingu@cpr.canon.co.jp)
|
|
28 ;;; Modified for Wnn V4 library on wnn4v3-egg.el
|
|
29
|
|
30 ;;; $B$?$^$4!V$?$+$J!W%P!<%8%g%s(B
|
|
31 ;;; $B!V$?$+$J!W$H$ODR$1J*$N$?$+$J$G$O$"$j$^$;$s!#(B
|
|
32 ;;; $B!V$?$^$4$h!?$+$7$3$/!?$J!<!<$l!W$NN,$r$H$C$FL?L>$7$^$7$?!#(B
|
|
33 ;;; Wnn V4 $B$N(B jl $B%i%$%V%i%j$r;H$$$^$9!#(B
|
|
34 ;;; $B%i%$%V%i%j$H$N%$%s%?!<%U%'!<%9$O(B wnnfns.c $B$GDj5A$5$l$F$$$^$9!#(B
|
|
35
|
|
36 ;;; $B=$@5%a%b(B
|
|
37
|
98
|
38 ;;; 97/2/4 Modified for use with XEmacs by J.Hein <jhod@po.iijnet.or.jp>
|
|
39 ;;; (mostly changes regarding extents and markers)
|
70
|
40 ;;; 94/2/3 kWnn support by H.Kuribayashi
|
|
41 ;;; 93/11/24 henkan-select-kouho: bug fixed
|
|
42 ;;; 93/7/22 hinsi-from-menu updated
|
|
43 ;;; 93/5/12 remove-regexp-in-string
|
|
44 ;;; fixed by Shuji NARAZAKI <narazaki@csce.kyushu-u.ac.jp>
|
|
45 ;;; 93/4/22 set-wnn-host-name, set-cwnn-host-name
|
|
46 ;;; 93/4/5 EGG:open-wnn, close-wnn modified by tsuiki.
|
|
47 ;;; 93/4/2 wnn-param-set
|
|
48 ;;; 93/4/2 modified along with wnn4fns.c
|
|
49 ;;; 93/3/3 edit-dict-item: bug fixed
|
|
50 ;;; 93/1/8 henkan-help-command modified.
|
|
51 ;;; 92/12/1 buffer local 'wnn-server-type' and 'cwnn-zhuyin'
|
|
52 ;;; so as to support individual its mode with multiple buffers.
|
|
53 ;;; 92/11/26 set-cserver-host-name fixed.
|
|
54 ;;; 92/11/26 its:{previous,next}-mode by <yasutome@ics.osaka-u.ac.jp>
|
|
55 ;;; 92/11/25 set-wnn-host-name was changed to set-{j,c}server-host-name.
|
|
56 ;;; 92/11/25 redefined its:select-mode and its:select-mode-from-menu
|
|
57 ;;; defined in egg.el to run hook with its mode selection.
|
|
58 ;;; 92/11/20 bug fixed related to henkan mode attribute.
|
|
59 ;;; 92/11/12 get-wnn-host-name and set-wnn-host-name were changed.
|
|
60 ;;; 92/11/10 (set-dict-comment) bug fixed
|
|
61 ;;; 92/10/27 (henkan-region-internal) display message if error occurs.
|
|
62 ;;; 92/9/28 completely modified for chinese trandlation.
|
|
63 ;;; 92/9/28 diced-{use,hindo-set} bug fixed <tetsuya@rabbit.is.s.u-tokyo.ac.jp>
|
|
64 ;;; 92/9/22 touroku-henkan-mode by <tsuiki@sfc.keio.ac.jp>
|
|
65 ;;; 92/9/18 rewrite wnn-dict-add to support password files.
|
|
66 ;;; 92/9/8 henkan-region-internal was modified.
|
|
67 ;;; 92/9/8 henkan-mode-map " " 'henkan-next-kouho-dai -> 'henkan-next-kouho
|
|
68 ;;; 92/9/7 henkan-mode-map "\C-h" 'help-command -> 'henkan-help-command (Shuji Narazaki)
|
|
69 ;;; 92/9/3 wnn-server-get-msg without wnn-error-code.
|
|
70 ;;; 92/9/3 get-wnn-lang-name was modified.
|
|
71 ;;; 92/8/19 get-wnn-lang-name $B$NJQ99(B (by T.Matsuzawa)
|
|
72 ;;; 92/8/5 Bug in henkan-kakutei-first-char fixed. (by Y.Kasai)
|
|
73 ;;; 92/7/17 set-egg-henkan-format $B$NJQ99(B
|
|
74 ;;; 92/7/17 egg:error $B$N0z?t$r(B format &rest args $B$KJQ99(B
|
|
75 ;;; 92/7/17 henkan/gyaku-henkan-word $B$N=$@5(B
|
|
76 ;;; 92/7/17 henkan/gyaku-henkan-paragraph/sentence/word $B$G!"(B
|
|
77 ;;; $BI=<($,Mp$l$k$N$r=$@5!J(Bsave-excursion $B$r$O$:$9!K(B
|
|
78 ;;; 92.7.14 Unnecessary '*' in comments of variables deleted. (by T.Ito)
|
|
79 ;;; 92/7/10 henkan-kakutei-first-char $B$rDI2C!"(BC-@ $B$K3d$jEv$F!#(B(by K.Handa)
|
|
80 ;;; 92/7/8 overwrite-mode $B$N%5%]!<%H(B(by K. Handa)
|
|
81 ;;; 92/6/30 startup file $B<~$j$NJQ99(B
|
|
82 ;;; 92/6/30 $BJQ49%b!<%I$N%"%H%j%S%e!<%H$K(B bold $B$rDI2C(B
|
|
83 ;;; (by ITO Toshiyuki <toshi@his.cpl.melco.co.jp>)
|
|
84 ;;; 92/6/22 $B6uJ8;zNs$rJQ49$9$k$HMn$A$k%P%0$r=$@5(B
|
|
85 ;;; 92/5/20 set-egg-henkan-mode-format $B$N(B bug fix
|
|
86 ;;; 92/5/20 egg:set-bunsetu-attribute $B$,BgJ8@a$G@5$7$/F0$/$h$&$KJQ99(B
|
|
87 ;;; 92/5/19 version 0
|
|
88 ;;; ----------------------------------------------------------------
|
|
89
|
|
90 ;;; Code:
|
|
91
|
114
|
92 (require 'egg)
|
70
|
93 (make-variable-buffer-local 'wnn-server-type)
|
|
94 (make-variable-buffer-local 'cwnn-zhuyin)
|
|
95
|
|
96 (defvar egg:*sho-bunsetu-face* nil "*$B>.J8@aI=<($KMQ$$$k(B face $B$^$?$O(B nil")
|
|
97 (make-variable-buffer-local
|
98
|
98 (defvar egg:*sho-bunsetu-extent* nil "$B>.J8@a$NI=<($K;H$&(B extent"))
|
70
|
99
|
|
100 (defvar egg:*sho-bunsetu-kugiri* "-" "*$B>.J8@a$N6h@Z$j$r<($9J8;zNs(B")
|
|
101
|
|
102 (defvar egg:*dai-bunsetu-face* nil "*$BBgJ8@aI=<($KMQ$$$k(B face $B$^$?$O(B nil")
|
|
103 (make-variable-buffer-local
|
98
|
104 (defvar egg:*dai-bunsetu-extent* nil "$BBgJ8@a$NI=<($K;H$&(B extent"))
|
70
|
105
|
|
106 (defvar egg:*dai-bunsetu-kugiri* " " "*$BBgJ8@a$N6h@Z$j$r<($9J8;zNs(B")
|
|
107
|
|
108 (defvar egg:*henkan-face* nil "*$BJQ49NN0h$rI=<($9$k(B face $B$^$?$O(B nil")
|
|
109 (make-variable-buffer-local
|
98
|
110 (defvar egg:*henkan-extent* nil "$BJQ49NN0h$NI=<($K;H$&(B extent"))
|
70
|
111
|
|
112 (defvar egg:*henkan-open* "|" "*$BJQ49$N;OE@$r<($9J8;zNs(B")
|
|
113 (defvar egg:*henkan-close* "|" "*$BJQ49$N=*E@$r<($9J8;zNs(B")
|
|
114
|
|
115 (defvar egg:henkan-mode-in-use nil)
|
|
116
|
|
117 ;;; ----------------------------------------------------------------
|
|
118 ;;; $B0J2<$N(B its mode $B4X78$N4X?t$O!"(Begg.el $B$GDj5A$5$l$F$$$k$,!"(B
|
|
119 ;;; $B$?$+$J$G$O(B its mode $B$N@ZBX$($KF14|$7$F!"(Bjserver/cserver,
|
|
120 ;;; pinyin/zhuyin $B$N@ZBX$($b9T$J$$$?$$$N$G!":FDj5A$7$F$$$k!#(B
|
114
|
121 ;;; $B=>$C$F!"(Begg.el, egg-wnn.el $B$N=g$K%m!<%I$7$J$1$l$P$J$i$J$$!#(B
|
70
|
122
|
|
123
|
|
124 (defun its:select-mode (name)
|
114
|
125 "Switch ITS mode to NAME or prompt for it if called interactivly.
|
|
126 After changing, its:select-mode-hook is called."
|
70
|
127 (interactive (list (completing-read "ITS mode: " its:*mode-alist*)))
|
|
128 (if (its:get-mode-map name)
|
|
129 (progn
|
|
130 (setq its:*current-map* (its:get-mode-map name))
|
|
131 (egg:mode-line-display)
|
|
132 (run-hooks 'its:select-mode-hook))
|
|
133 (beep))
|
|
134 )
|
|
135
|
|
136 (defun its:select-mode-from-menu ()
|
114
|
137 "Select ITS mode from menu.
|
|
138 After changing, its:select-mode-hook is called."
|
70
|
139 (interactive)
|
|
140 (setcar (nthcdr 2 its:*select-mode-menu*) its:*mode-alist*)
|
|
141 (setq its:*current-map* (menu:select-from-menu its:*select-mode-menu*))
|
|
142 (egg:mode-line-display)
|
|
143 (run-hooks 'its:select-mode-hook))
|
|
144
|
|
145 (defvar its:select-mode-hook
|
|
146 (function
|
|
147 (lambda ()
|
|
148 (cond ((eq its:*current-map* (its:get-mode-map "roma-kana"))
|
|
149 (setq wnn-server-type 'jserver))
|
|
150 ((eq its:*current-map* (its:get-mode-map "PinYin"))
|
|
151 (setq wnn-server-type 'cserver)
|
|
152 (setq cwnn-zhuyin nil))
|
|
153 ((eq its:*current-map* (its:get-mode-map "zhuyin"))
|
|
154 (setq wnn-server-type 'cserver)
|
|
155 (setq cwnn-zhuyin t))
|
|
156 ((eq its:*current-map* (its:get-mode-map "hangul"))
|
|
157 (setq wnn-server-type 'kserver))
|
|
158 ))))
|
|
159
|
|
160 (defun its:next-mode ()
|
114
|
161 "Switch to next mode in list its:*standard-modes*
|
|
162 After changing, its:select-mode-hook is called."
|
70
|
163 (interactive)
|
|
164 (let ((pos (its:find its:*current-map* its:*standard-modes*)))
|
|
165 (setq its:*current-map*
|
|
166 (nth (% (1+ pos) (length its:*standard-modes*))
|
|
167 its:*standard-modes*))
|
|
168 (egg:mode-line-display)
|
|
169 (run-hooks 'its:select-mode-hook)))
|
|
170
|
|
171 (defun its:previous-mode ()
|
114
|
172 "Switch to previous mode in list its:*standard-modes*
|
|
173 After changing, its:select-mode-hook is called."
|
70
|
174 (interactive)
|
|
175 (let ((pos (its:find its:*current-map* its:*standard-modes*)))
|
|
176 (setq its:*current-map*
|
|
177 (nth (1- (if (= pos 0) (length its:*standard-modes*) pos))
|
|
178 its:*standard-modes*))
|
|
179 (egg:mode-line-display)
|
|
180 (run-hooks 'its:select-mode-hook)))
|
|
181
|
|
182 (defun read-current-its-string (prompt &optional initial-input henkan)
|
|
183 (save-excursion
|
|
184 (let ((old-its-map its:*current-map*)
|
|
185 (minibuff (window-buffer (minibuffer-window))))
|
|
186 (set-buffer minibuff)
|
|
187 (setq egg:*input-mode* t
|
|
188 egg:*mode-on* t
|
|
189 its:*current-map* old-its-map)
|
|
190 (mode-line-egg-mode-update
|
|
191 (nth 1 (its:get-mode-indicator its:*current-map*)))
|
|
192 (read-from-minibuffer prompt initial-input
|
|
193 (if henkan nil
|
|
194 egg:*minibuffer-local-hiragana-map*)))))
|
|
195
|
|
196 ;;;----------------------------------------------------------------------
|
|
197 ;;;
|
|
198 ;;; Kana Kanji Henkan
|
|
199 ;;;
|
|
200 ;;;----------------------------------------------------------------------
|
|
201
|
|
202 (defvar wnn-host-name nil "Jserver host name currently connected")
|
|
203 (defvar cwnn-host-name nil "Cserver host name currently connected")
|
|
204 (defvar kwnn-host-name nil "Kserver host name currently connected")
|
|
205 (defvar jserver-list nil "*List of jserver host name")
|
|
206 (defvar cserver-list nil "*List of cserver host name")
|
|
207 (defvar kserver-list nil "*List of kserver host name")
|
|
208
|
|
209 (defvar egg:*sai-henkan-start* nil)
|
|
210 (defvar egg:*sai-henkan-end* nil)
|
|
211 (defvar egg:*old-bunsetu-suu* nil)
|
|
212
|
114
|
213 (defun egg-wnn:kill-emacs-function ()
|
70
|
214 (let ((wnn-server-type))
|
|
215 (setq wnn-server-type 'jserver)
|
|
216 (close-wnn)
|
|
217 (setq wnn-server-type 'cserver)
|
|
218 (close-wnn)
|
|
219 (setq wnn-server-type 'kserver)
|
|
220 (close-wnn)))
|
|
221
|
114
|
222 (add-hook 'kill-emacs-hook 'egg-wnn:kill-emacs-function)
|
70
|
223
|
|
224 (defun egg:error (form &rest mesg)
|
|
225 (apply 'notify (or form "%s") mesg)
|
|
226 (apply 'error (or form "%s") mesg))
|
|
227
|
114
|
228 (defun wnn-toggle-english-messages ()
|
|
229 "Toggle whether wnn reports info in english or the native language of the server."
|
|
230 (interactive)
|
|
231 (setq wnn-english-messages (not wnn-english-messages)))
|
|
232
|
|
233 (defvar wnn-english-messages nil "*If non-nil, display messages from the [jck]server in English")
|
|
234
|
|
235 (make-symbol "english-mess")
|
|
236
|
70
|
237 (defun egg:msg-get (message)
|
|
238 (or
|
114
|
239 (nth 1 (assoc message (nth 1 (assoc (if wnn-english-messages 'english-mess wnn-server-type)
|
|
240 *egg-message-alist*))))
|
70
|
241 (format "No message. Check *egg-message-alist* %s %s"
|
|
242 wnn-server-type message)))
|
|
243
|
|
244 (defvar *egg-message-alist*
|
114
|
245 '((english-mess
|
|
246 ((open-wnn "Connected with Wnn on host %s")
|
|
247 (no-rcfile "No egg-startup-file on %s")
|
|
248 (file-saved "Wnn dictionary and frequency data recorded.")
|
|
249 (henkan-mode-indicator "$B4A(B")
|
140
|
250 (begin-henkan "Fence starting character: ")
|
|
251 (end-henkan "Fence ending character: ")
|
|
252 (kugiri-dai "Large bunsetsu separator: ")
|
|
253 (kugiri-sho "Small bunsetsu separator: ")
|
|
254 (face-henkan "Face for conversion: ")
|
|
255 (face-dai "Face for large bunsetsu: ")
|
|
256 (face-sho "Face for small bunsetsu: ")
|
|
257 (jikouho "Entries:")
|
114
|
258 (off-msg "%s %s(%s:%s) turned off.")
|
|
259 (henkan-help "Kanji conversion mode:
|
140
|
260 Bunsetsu motion commands
|
|
261 \\[henkan-first-bunsetu]\tFirst bunsetsu\t\\[henkan-last-bunsetu]\tLast bunsetsu
|
|
262 \\[henkan-backward-bunsetu]\tPrevious bunsetsu\t\\[henkan-forward-bunsetu]\tNext bunsetsu
|
|
263 Bunsetsu conversion commands
|
|
264 \\[henkan-next-kouho-dai]\tNext larger match\t\\[henkan-next-kouho-sho]\tNext smaller match
|
|
265 \\[henkan-previous-kouho]\tPrevious match\t\\[henkan-next-kouho]\tNext match
|
|
266 \\[henkan-bunsetu-nobasi-dai]\tExtend bunsetsu largest\t\\[henkan-bunsetu-chijime-dai]\tShrink bunsetsu smallest
|
|
267 \\[henkan-bunsetu-nobasi-sho]\tExtend bunsetsu\t\\[henkan-bunsetu-chijime-sho]\tShrink bunsetsu
|
|
268 \\[henkan-select-kouho-dai]\tMenu select largest match\t\\[henkan-select-kouho-sho]\tMenu select smallest match
|
|
269 Conversion commands
|
|
270 \\[henkan-kakutei]\tComplete conversion commit\t\\[henkan-kakutei-before-point]\tCommit before point
|
|
271 \\[henkan-quit]\tAbort conversion
|
114
|
272 ")
|
|
273 (hinsimei "Hinshi (product/noun) name:")
|
|
274 (jishotouroku-yomi "Dictionary entry for$B!X(B%s$B!Y(B reading:")
|
|
275 (touroku-jishomei "Name of dictionary:" )
|
|
276 (registerd "Dictonary entry$B!X(B%s$B!Y(B(%s: %s) registered in %s.")
|
|
277 (yomi "Reading$B!'(B")
|
|
278 (no-yomi "No dictionary entry for $B!X(B%s$B!Y(B.")
|
|
279 (jisho "Dictionary:")
|
|
280 (hindo "Frequency:")
|
|
281 (kanji "Kanji:")
|
|
282 (register-notify "Dictonary entry$B!X(B%s$B!Y(B(%s: %s) registered in %s.")
|
|
283 (cannot-remove "Cannot delete entry from system dictionary.")
|
|
284 (enter-hindo "Enter frequency:")
|
|
285 (remove-notify "Dictonary entry$B!X(B%s$B!Y(B(%s) removed from %s.")
|
|
286 (removed "Dictonary entry$B!X(B%s$B!Y(B(%s) removed from %s.")
|
|
287 (jishomei "Dictionary name:" )
|
|
288 (comment "Comment:")
|
|
289 (jisho-comment "Dictionary:%s: comment:%s")
|
|
290 (param ("$B#N(B ( $BBg(B ) $BJ8@a2r@O$N#N(B"
|
|
291 "$BBgJ8@aCf$N>.J8@a$N:GBg?t(B"
|
|
292 "$B448l$NIQEY$N%Q%i%a!<%?(B"
|
|
293 "$B>.J8@aD9$N%Q%i%a!<%?(B"
|
|
294 "$B448lD9$N%Q%i%a!<%?(B"
|
|
295 "$B:#;H$C$?$h%S%C%H$N%Q%i%a!<%?(B"
|
|
296 "$B<-=q$N%Q%i%a!<%?(B"
|
|
297 "$B>.J8@a$NI>2ACM$N%Q%i%a!<%?(B"
|
|
298 "$BBgJ8@aD9$N%Q%i%a!<%?(B"
|
|
299 "$B>.J8@a?t$N%Q%i%a!<%?(B"
|
|
300 "$B5?;wIJ;l(B $B?t;z$NIQEY(B"
|
|
301 "$B5?;wIJ;l(B $B%+%J$NIQEY(B"
|
|
302 "$B5?;wIJ;l(B $B1Q?t$NIQEY(B"
|
|
303 "$B5?;wIJ;l(B $B5-9f$NIQEY(B"
|
|
304 "$B5?;wIJ;l(B $BJD3g8L$NIQEY(B"
|
|
305 "$B5?;wIJ;l(B $BIUB08l$NIQEY(B"
|
|
306 "$B5?;wIJ;l(B $B3+3g8L$NIQEY(B"))
|
|
307 ))
|
|
308 (jserver
|
70
|
309 ((open-wnn "$B%[%9%H(B %s $B$N(B Wnn $B$r5/F0$7$^$7$?(B")
|
|
310 (no-rcfile "%s $B>e$K(B egg-startup-file $B$,$"$j$^$;$s!#(B")
|
|
311 (file-saved "Wnn$B$NIQEY>pJs!&<-=q>pJs$rB`Hr$7$^$7$?!#(B")
|
|
312 (henkan-mode-indicator "$B4A(B")
|
|
313 (begin-henkan "$BJQ493+;OJ8;zNs(B: ")
|
|
314 (end-henkan "$BJQ49=*N;J8;zNs(B: ")
|
|
315 (kugiri-dai "$BBgJ8@a6h@Z$jJ8;zNs(B: ")
|
|
316 (kugiri-sho "$B>.J8@a6h@Z$jJ8;zNs(B: ")
|
|
317 (face-henkan "$BJQ496h4VI=<(B0@-(B: ")
|
|
318 (face-dai "$BBgJ8@a6h4VI=<(B0@-(B: ")
|
|
319 (face-sho "$B>.J8@a6h4VI=<(B0@-(B: ")
|
|
320 (jikouho "$B<!8uJd(B:")
|
|
321 (off-msg "%s %s(%s:%s)$B$r(B off $B$7$^$7$?!#(B")
|
|
322 (henkan-help "$B4A;zJQ49%b!<%I(B:
|
|
323 $BJ8@a0\F0(B
|
|
324 \\[henkan-first-bunsetu]\t$B@hF,J8@a(B\t\\[henkan-last-bunsetu]\t$B8eHxJ8@a(B
|
|
325 \\[henkan-backward-bunsetu]\t$BD>A0J8@a(B\t\\[henkan-forward-bunsetu]\t$BD>8eJ8@a(B
|
|
326 $BJQ49JQ99(B
|
|
327 $BBgJ8@a<!8uJd(B \\[henkan-next-kouho-dai]\t$B>.J8@a<!8uJd(B \\[henkan-next-kouho-sho]
|
|
328 $BA08uJd(B \\[henkan-previous-kouho] \t$B<!8uJd(B \\[henkan-next-kouho]
|
|
329 $BBgJ8@a?-$7(B \\[henkan-bunsetu-nobasi-dai] \t$BBgJ8@a=L$a(B \\[henkan-bunsetu-chijime-dai]
|
|
330 $B>.J8@a?-$7(B \\[henkan-bunsetu-nobasi-sho] \t$B>.J8@a=L$a(B \\[henkan-bunsetu-chijime-sho]
|
|
331 $BBgJ8@aJQ498uJdA*Br(B \\[henkan-select-kouho-dai] \t$B>.J8@aJQ498uJdA*Br(B \\[henkan-select-kouho-sho]
|
|
332 $BJQ493NDj(B
|
|
333 $BA4J8@a3NDj(B \\[henkan-kakutei] \t$BD>A0J8@a$^$G3NDj(B \\[henkan-kakutei-before-point]
|
|
334 $BJQ49Cf;_(B \\[henkan-quit]
|
|
335 ")
|
|
336 (hinsimei "$BIJ;lL>(B:")
|
|
337 (jishotouroku-yomi "$B<-=qEPO?!X(B%s$B!Y(B $BFI$_(B :")
|
|
338 (touroku-jishomei "$BEPO?<-=qL>(B:" )
|
|
339 (registerd "$B<-=q9`L\!X(B%s$B!Y(B(%s: %s)$B$r(B%s$B$KEPO?$7$^$7$?!#(B" )
|
|
340 (yomi "$B$h$_!'(B")
|
|
341 ; (no-yomi "$B!X(B%s$B!Y$N<-=q9`L\$O$"$j$^$;$s!#(B")
|
|
342 (no-yomi "$B<-=q9`L\!X(B%s$B!Y$O$"$j$^$;$s!#(B")
|
|
343 (jisho "$B<-=q!'(B")
|
|
344 (hindo " $BIQEY!'(B")
|
|
345 (kanji "$B4A;z!'(B")
|
|
346 (register-notify "$B<-=q9`L\!X(B%s$B!Y(B(%s: %s)$B$r(B%s$B$KEPO?$7$^$9!#(B")
|
|
347 (cannot-remove "$B%7%9%F%`<-=q9`L\$O:o=|$G$-$^$;$s!#(B")
|
|
348 (enter-hindo "$BIQEY$rF~$l$F2<$5$$(B: ")
|
|
349 (remove-notify "$B<-=q9`L\(B%s(%s)$B$r(B%s$B$+$i:o=|$7$^$9!#(B")
|
|
350 (removed "$B<-=q9`L\(B%s(%s)$B$r(B%s$B$+$i:o=|$7$^$7$?!#(B")
|
|
351 (jishomei "$B<-=qL>(B:" )
|
|
352 (comment "$B%3%a%s%H(B: ")
|
|
353 (jisho-comment "$B<-=q(B:%s: $B%3%a%s%H(B:%s")
|
|
354 (param ("$B#N(B ( $BBg(B ) $BJ8@a2r@O$N#N(B"
|
|
355 "$BBgJ8@aCf$N>.J8@a$N:GBg?t(B"
|
|
356 "$B448l$NIQEY$N%Q%i%a!<%?(B"
|
|
357 "$B>.J8@aD9$N%Q%i%a!<%?(B"
|
|
358 "$B448lD9$N%Q%i%a!<%?(B"
|
|
359 "$B:#;H$C$?$h%S%C%H$N%Q%i%a!<%?(B"
|
|
360 "$B<-=q$N%Q%i%a!<%?(B"
|
|
361 "$B>.J8@a$NI>2ACM$N%Q%i%a!<%?(B"
|
|
362 "$BBgJ8@aD9$N%Q%i%a!<%?(B"
|
|
363 "$B>.J8@a?t$N%Q%i%a!<%?(B"
|
|
364 "$B5?;wIJ;l(B $B?t;z$NIQEY(B"
|
|
365 "$B5?;wIJ;l(B $B%+%J$NIQEY(B"
|
|
366 "$B5?;wIJ;l(B $B1Q?t$NIQEY(B"
|
|
367 "$B5?;wIJ;l(B $B5-9f$NIQEY(B"
|
|
368 "$B5?;wIJ;l(B $BJD3g8L$NIQEY(B"
|
|
369 "$B5?;wIJ;l(B $BIUB08l$NIQEY(B"
|
|
370 "$B5?;wIJ;l(B $B3+3g8L$NIQEY(B"))
|
|
371 ))
|
|
372 (cserver
|
|
373 ((open-wnn "Host %s $AIO5D(B cWnn $ARQ>-Fp6/AK(B")
|
|
374 (no-rcfile "$ATZ(B%s $AIOC;SP(B egg-startup-file")
|
|
375 (file-saved "Wnn$A5DF56HND<~:M4G5dPEO"RQ>-MK3vAK(B")
|
|
376 (henkan-mode-indicator "$A::(B")
|
|
377 (begin-henkan "$A1d;;?*J<WV7{AP(B: ")
|
|
378 (end-henkan "$A1d;;=aJxWV7{AP(B: ")
|
|
379 (kugiri-dai "$A4JWi7V8nWV7{AP(B: ")
|
|
380 (kugiri-sho "$A5%4J7V8nWV7{AP(B: ")
|
|
381 (face-henkan "$A1d;;Gx<d1mJ>JtPT(B: ")
|
|
382 (face-dai "$A4JWiGx<d1mJ>JtPT(B: ")
|
|
383 (face-sho "$A5%4JGx<d1mJ>JtPT(B: ")
|
|
384 (jikouho "$A4N:nQ!(B:")
|
|
385 (off-msg "%s %s(%s:%s)$ARQ1;(B off $A5tAK(B")
|
|
386 (henkan-help "$A::WV1d;;D#J=(B:
|
|
387 $A4JWiRF6/(B
|
|
388 \\[henkan-first-bunsetu]\t$AOHM74JWi(B\t\\[henkan-last-bunsetu]\t$A=aN24JWi(B
|
|
389 \\[henkan-backward-bunsetu]\t$AG0R;8v4JWi(B\t\\[henkan-forward-bunsetu]\t$AOBR;8v4JWi(B
|
|
390 $A1d;;1d8|(B
|
|
391 $A4JWi4N:nQ!(B \\[henkan-next-kouho-dai]\t$A5%4J4N:nQ!(B \\[henkan-next-kouho-sho]
|
|
392 $AG0:nQ!(B \\[henkan-previous-kouho] \t$A4N:nQ!(B \\[henkan-next-kouho]
|
|
393 $A4JWi@)U9(B \\[henkan-bunsetu-nobasi-dai] \t$A4JWiJUKu(B \\[henkan-bunsetu-chijime-dai]
|
|
394 $A5%4J@)U9(B \\[henkan-bunsetu-nobasi-sho] \t$A5%4JJUKu(B \\[henkan-bunsetu-chijime-sho]
|
|
395 $A4JWi1d;;:r295DQ!Tq(B \\[henkan-select-kouho-dai] \t$A5%4J1d;;:r295DQ!Tq(B \\[henkan-select-kouho-sho]
|
|
396 $A1d;;:r295DQ!Tq(B \\[henkan-select-kouho-dai]
|
|
397 $A1d;;H76((B
|
|
398 $AH+NDH76((B \\[henkan-kakutei] \t$AIOR;4JWiN*V95DH76((B \\[henkan-kakutei-before-point]
|
|
399 $AM#V91d;;(B \\[henkan-quit]
|
|
400 ")
|
|
401 (hinsimei "$A4JPTC{(B:")
|
|
402 (jishotouroku-yomi "$A4G5d5GB<!:(B%s$A!;F47((B :")
|
|
403 (touroku-jishomei "$A5GB<4G5dC{(B:" )
|
|
404 (registerd "$A4G5dOnD?!:(B%s$A!;(B(%s: %s)$ARQ1;5GB<5=(B %s $AVPAK(B" )
|
|
405 (yomi "$AF47($B!'(B")
|
|
406 ; (no-yomi "$A!:(B%s$A!;5D4G5dOnD?2;4fTZ(B")
|
|
407 (no-yomi "$A4G5dOnD?!:(B%s$A!;2;4fTZ(B")
|
|
408 (jisho "$A4G5d(B:")
|
|
409 (hindo " $AF56H$B!'(B")
|
|
410 (kanji "$A::WV$B!'(B")
|
|
411 (register-notify "$A4G5dOnD?!:(B%s$A!;(B(%s: %s)$A=+R*1;5GB<5=(B %s $AVP(B")
|
|
412 (cannot-remove "$AO5M34G5dOn2;D\O{3}(B")
|
|
413 (enter-hindo "$AGkJdHkF56H(B: ")
|
|
414 (remove-notify "$A4G5dOnD?(B%s(%s)$A=+R*4S(B %s $AVPO{3}(B")
|
|
415 (removed "$A4G5dOnD?(B%s(%s)$ARQ>-4S(B%s$AVPO{3}AK(B")
|
|
416 (jishomei "$A4G5dC{(B:" )
|
|
417 (comment "$AW"JM(B: ")
|
|
418 (jisho-comment "$A4G5d(B:%s: $AW"JM(B:%s")
|
|
419 (param ("$A=bNv4JWi8vJ}(B"
|
|
420 "$A4JWiVP4J5DWn4s8vJ}(B"
|
|
421 "$AF56HH(V5(B"
|
|
422 "$A4J3$6HH(V5(B"
|
|
423 "$AKDIyU}H76HH(V5(B"
|
|
424 "$A8U2ESC9}H(V5(B"
|
|
425 "$AWV5dSEOH<6H(V5(B"
|
|
426 "$A4JF@<[>yV5H(V5(B"
|
|
427 "$A4JWi3$H(V5(B"
|
|
428 "$A4JWiVP4JJ}H(V5(B"
|
|
429 "$AJ}WV5DF56H(B"
|
|
430 "$AS"NDWVD85DF56H(B"
|
|
431 "$A<G:E5DF56H(B"
|
|
432 "$A?*@(;!5DF56H(B"
|
|
433 "$A1U@(;!5DF56H(B"
|
|
434 "$AWn4s:r298vJ}(B"
|
|
435 "$A18SC(B"
|
|
436 ))
|
|
437 ))
|
|
438 (kserver
|
|
439 ((open-wnn "$(CH#=:F.(B %s $(C@G(B kWnn $(C8&(B $(CQ&TQG_@>4O4Y(B.")
|
|
440 (no-rcfile "%s $(C?!(B egg-startup-file $(C@L(B $(C>x@>4O4Y(B.")
|
|
441 (file-saved "kWnn $(C@G(B $(C^:SxoW\C!$^vnpoW\C8&(B $(C?E0e@>4O4Y(B.")
|
|
442 (henkan-mode-indicator "$(CyS(B")
|
|
443 (begin-henkan "$(C\(|5(B $(CKRc7(B $(CY~m.fj(B: ")
|
|
444 (end-henkan "$(C\(|5(B $(Cp{Vu(B $(CY~m.fj(B: ")
|
|
445 (kugiri-dai "$(CS^Y~o=(B $(CO!\,(B $(CY~m.fj(B: ")
|
|
446 (kugiri-sho "$(Ca3Y~o=(B $(CO!\,(B $(CY~m.fj(B: ")
|
|
447 (face-henkan "$(C\(|5(B $(CO!J`(B $(CxvcF(B $(CaU`u(B: ")
|
|
448 (face-dai "$(CS^Y~o=(B $(CO!J`(B $(CxvcF(B $(CaU`u(B: ")
|
|
449 (face-sho "$(Ca3Y~o=(B $(CO!J`(B $(CxvcF(B $(CaU`u(B: ")
|
|
450 (jikouho "$(C4Y@=(B $(C}&\M(B:")
|
|
451 (off-msg "%s %s(%s:%s)$(C@;(B off $(CG_@>4O4Y(B.")
|
|
452 (henkan-help "$(CySm.(B $(C\(|5(B $(C8p5e(B:
|
|
453 $(CY~o=(B $(Cl9TQ(B
|
|
454 \\[henkan-first-bunsetu]\t$(C`;Ti(B $(CY~o=(B\t\\[henkan-last-bunsetu]\t$(C}-Z-(B $(CY~o=(B
|
|
455 \\[henkan-backward-bunsetu]\t$(CrAnq(B $(CY~o=(B\t\\[henkan-forward-bunsetu]\t$(CrA}-(B $(CY~o=(B
|
|
456 $(C\(|5(B $(C\(LZ(B
|
|
457 $(CS^Y~o=(B $(C4Y@=(B $(C}&\M(B \\[henkan-next-kouho-dai]\t$(Ca3Y~o=(B $(C4Y@=(B $(C}&\M(B \\[henkan-next-kouho-sho]
|
|
458 $(Cnq(B $(C}&\M(B \\[henkan-previous-kouho] \t$(C4Y@=(B $(C}&\M(B \\[henkan-next-kouho]
|
|
459 $(CS^Y~o=(B $(C|*S^(B \\[henkan-bunsetu-nobasi-dai] \t$(CS^Y~o=(B $(Cuja3(B \\[henkan-bunsetu-chijime-dai]
|
|
460 $(Ca3Y~o=(B $(C|*S^(B \\[henkan-bunsetu-nobasi-sho] \t$(Ca3Y~o=(B $(Cuja3(B \\[henkan-bunsetu-chijime-sho]
|
|
461 $(CS^Y~o=(B $(C\(|5(B $(C4Y@=(B $(C}&\M(B \\[henkan-select-kouho-dai] \t$(Ca3Y~o=(B $(C\(|5(B $(C4Y@=(B $(C}&\M(B \\[henkan-select-kouho-sho]
|
|
462 $(C\(|5(B $(C|,oR(B
|
|
463 $(CnoY~o=(B $(C|,oR(B \\[henkan-kakutei] \t$(CrAnq(B $(CY~o=1nAv(B $(C|,oR(B \\[henkan-kakutei-before-point]
|
|
464 $(C\(|5(B $(Cqir-(B \\[henkan-quit]
|
|
465 ")
|
|
466 (hinsimei "$(Cy!^rY#(B: ")
|
|
467 (jishotouroku-yomi "$(C^vnp(B $(CTtVb!:(B%s$(C!;(B $(CGQ1[(B: ")
|
|
468 (touroku-jishomei "$(CTtVb(B $(C^vnpY#(B: " )
|
|
469 (registerd "$(C^vnp(B $(Cz#YM!:(B%s$(C!;(B(%s: %s)$(C@;(B %s$(C?!(B $(CTtVbG_@>4O4Y(B." )
|
|
470 (yomi "$(CGQ1[(B: ")
|
|
471 ; (no-yomi "$(C!:(B%s$(C!;@G(B $(C^vnp(B $(Cz#YM@L(B $(C>x@>4O4Y(B.")
|
|
472 (no-yomi "$(C^vnp(B $(Cz#YM(B $(C!:(B%s$(C!;@L(B $(C>x@>4O4Y(B.")
|
|
473 (jisho "$(C^vnp(B: ")
|
|
474 (hindo " $(C^:Sx(B: ")
|
|
475 (kanji "$(CySm.(B: ")
|
|
476 (register-notify "$(C^vnp(B $(Cz#YM(B $(C!:(B%s$(C!;(B(%s: %s)$(C@;(B %s$(C?!(B $(CTtVbGO0Z@>4O4Y(B.")
|
|
477 (cannot-remove "$(C=C=:E[(B $(C^vnpz#YM@:(B $(Ca<K[GR(B $(C<v(B $(C>x@>4O4Y(B.")
|
|
478 (enter-hindo "$(C^:Sx8&(B $(Cl}UtGO=J=C?@(B: ")
|
|
479 (remove-notify "$(C^vnpz#YM(B %s(%s)$(C@;(B %s$(C:NEM(B $(Ca<K[GO0Z@>4O4Y(B.")
|
|
480 (removed "$(C^vnp(B $(Cz#YM(B %s(%s)$(C@;(B %s$(C:NEM(B $(Ca<K[G_@>4O4Y(B.")
|
|
481 (jishomei "$(C^vnpY#(B: " )
|
|
482 (comment "$(CqI`7(B: ")
|
|
483 (jisho-comment "$(C^vnp(B:%s: $(CqI`7(B:%s")
|
|
484 (param ("N ($(CS^(B)$(CY~o=(B $(Cz0`0@G(B N"
|
|
485 "$(CS^Y~o=(B $(C>H@G(B $(Ca3Y~o=(B $(C<v@G(B $(CuLS^b&(B"
|
|
486 "$(CJOe^@G(B $(C^:Sx(B $(CFP7/9LEM(B"
|
|
487 "$(Ca3Y~o=(B $(C1f@L(B $(CFP7/9LEM(B"
|
|
488 "$(CJOe^@G(B $(C1f@L(B $(CFP7/9LEM(B"
|
|
489 "$(Cq~PQ(B $(C^EiDG_@>4O4Y(B $(C:qF.(B $(CFP7/9LEM(B"
|
|
490 "$(C^vnp@G(B $(CFP7/9LEM(B"
|
|
491 "$(Ca3Y~o=@G(B $(CxDJ$v7(B $(CFP7/9LEM(B"
|
|
492 "$(CS^Y~o=(B $(C1f@L(B $(CFP7/9LEM(B"
|
|
493 "$(Ca3Y~o=(B $(Cb&(B $(CFP7/9LEM(B"
|
|
494 "$(CJ#_L(B $(Cy!^r(B: $(Cb&m.@G(B $(C^:Sx(B"
|
|
495 "$(CJ#_L(B $(Cy!^r(B: $(CGQ1[@G(B $(C^:Sx(B"
|
|
496 "$(CJ#_L(B $(Cy!^r(B: $(CgHb&m.@G(B $(C^:Sx(B"
|
|
497 "$(CJ#_L(B $(Cy!^r(B: $(CQ@{\@G(B $(C^:Sx(B"
|
|
498 "$(CJ#_L(B $(Cy!^r(B: $(CxMN@{A@G(B $(C^:Sx(B"
|
|
499 "$(CJ#_L(B $(Cy!^r(B: $(C]>aUe^@G(B $(C^:Sx(B"
|
|
500 "$(CJ#_L(B $(Cy!^r(B: $(CKRN@{A@G(B $(C^:Sx(B"))
|
|
501 ))
|
|
502 ))
|
|
503
|
|
504
|
|
505 ;;;
|
|
506 ;;; Entry functions for egg-startup-file
|
|
507 ;;;
|
|
508
|
|
509 ;(defvar wnn-lang-name nil)
|
|
510 ;(defvar default-wnn-lang-name "ja_JP") ; 92.8.19 by T.Matsuzawa
|
|
511
|
|
512 (defvar skip-wnn-setenv-if-env-exist nil
|
|
513 "skip wnn environment setting when the same name environment exists")
|
|
514
|
|
515 (defmacro push-end (val loc)
|
|
516 (list 'push-end-internal val (list 'quote loc)))
|
|
517
|
|
518 (defun push-end-internal (val loc)
|
|
519 (set loc
|
|
520 (if (eval loc)
|
|
521 (nconc (eval loc) (cons val nil))
|
|
522 (cons val nil))))
|
|
523
|
|
524 (defun is-wnn6-server ()
|
|
525 (= (wnn-server-version) 61697))
|
|
526
|
|
527 (defun add-wnn-dict (dfile hfile priority dmode hmode &optional dpaswd hpaswd)
|
|
528 ; (open-wnn-if-disconnected)
|
|
529 (if (null (wnn-server-dict-add
|
|
530 (substitute-in-file-name dfile)
|
|
531 (substitute-in-file-name hfile)
|
|
532 priority dmode hmode dpaswd hpaswd))
|
|
533 (egg:error (wnn-server-get-msg))))
|
|
534
|
|
535 (defun set-wnn-fuzokugo (ffile)
|
|
536 ; (open-wnn-if-disconnected)
|
|
537 (if (null (wnn-server-fuzokugo-set (substitute-in-file-name ffile)))
|
|
538 (egg:error (wnn-server-get-msg))))
|
|
539
|
98
|
540 ;; ###jhod Currently very broken. Needs to be rewritten for the new
|
|
541 ;; wnn-server-set-param
|
70
|
542 (defun set-wnn-param (&rest param)
|
114
|
543 "Set parameters for the current wnn session.
|
|
544 Uses property list PARAM, or prompts if called interactivly.
|
|
545
|
|
546 Currently very broken."
|
70
|
547 (interactive)
|
|
548 ; (open-wnn-if-disconnected)
|
|
549 (let ((current-param (wnn-server-get-param))
|
|
550 (new-param)
|
|
551 (message (egg:msg-get 'param)))
|
|
552 (while current-param
|
|
553 (setq new-param
|
|
554 (cons
|
|
555 (if (or (null param) (null (car param)))
|
|
556 (string-to-int
|
|
557 (read-from-minibuffer (concat (car message) ": ")
|
|
558 (int-to-string (car current-param))))
|
|
559 (car param))
|
|
560 new-param))
|
|
561 (setq current-param (cdr current-param)
|
|
562 message (cdr message)
|
|
563 param (if param (cdr param) nil)))
|
|
564 (apply 'wnn-server-set-param (nreverse new-param))))
|
|
565
|
|
566 ;;
|
|
567 ;; for Wnn6
|
|
568 ;;
|
|
569 (defun add-wnn-fisys-dict (dfile hfile hmode &optional hpaswd)
|
|
570 ; (open-wnn-if-disconnected)
|
|
571 (if (null (wnn-server-fisys-dict-add
|
|
572 (substitute-in-file-name dfile)
|
|
573 (substitute-in-file-name hfile)
|
|
574 hmode hpaswd))
|
|
575 (egg:error (wnn-server-get-msg))))
|
|
576
|
|
577 (defun add-wnn-fiusr-dict (dfile hfile dmode hmode &optional dpaswd hpaswd)
|
|
578 ; (open-wnn-if-disconnected)
|
|
579 (if (null (wnn-server-fiusr-dict-add
|
|
580 (substitute-in-file-name dfile)
|
|
581 (substitute-in-file-name hfile)
|
|
582 dmode hmode dpaswd hpaswd))
|
|
583 (egg:error (wnn-server-get-msg))))
|
|
584
|
|
585 (defun add-wnn-notrans-dict (dfile priority dmode &optional dpaswd)
|
|
586 ; (open-wnn-if-disconnected)
|
|
587 (if (null (wnn-server-notrans-dict-add
|
|
588 (substitute-in-file-name dfile)
|
|
589 priority dmode dpaswd))
|
|
590 (egg:error (wnn-server-get-msg))))
|
|
591
|
|
592 (defun add-wnn-bmodify-dict (dfile priority dmode &optional dpaswd)
|
|
593 ; (open-wnn-if-disconnected)
|
|
594 (if (null (wnn-server-bmodify-dict-add
|
|
595 (substitute-in-file-name dfile)
|
|
596 priority dmode dpaswd))
|
|
597 (egg:error (wnn-server-get-msg))))
|
|
598
|
|
599 (defun set-last-is-first-mode (mode)
|
|
600 ; (open-wnn-if-disconnected)
|
|
601 (if (null (wnn-server-set-last-is-first
|
|
602 mode))
|
|
603 (egg:error (wnn-server-get-msg))))
|
|
604
|
|
605 (defun set-complex-conv-mode (mode)
|
|
606 ; (open-wnn-if-disconnected)
|
|
607 (if (null (wnn-server-set-complex-conv-mode
|
|
608 mode))
|
|
609 (egg:error (wnn-server-get-msg))))
|
|
610
|
|
611 (defun set-okuri-learn-mode (mode)
|
|
612 ; (open-wnn-if-disconnected)
|
|
613 (if (null (wnn-server-set-okuri-learn-mode
|
|
614 mode))
|
|
615 (egg:error (wnn-server-get-msg))))
|
|
616
|
|
617 (defun set-okuri-flag (mode)
|
|
618 ; (open-wnn-if-disconnected)
|
|
619 (if (null (wnn-server-set-okuri-flag
|
|
620 mode))
|
|
621 (egg:error (wnn-server-get-msg))))
|
|
622
|
|
623 (defun set-prefix-learn-mode (mode)
|
|
624 ; (open-wnn-if-disconnected)
|
|
625 (if (null (wnn-server-set-prefix-learn-mode
|
|
626 mode))
|
|
627 (egg:error (wnn-server-get-msg))))
|
|
628
|
|
629 (defun set-prefix-flag (mode)
|
|
630 ; (open-wnn-if-disconnected)
|
|
631 (if (null (wnn-server-set-prefix-flag
|
|
632 mode))
|
|
633 (egg:error (wnn-server-get-msg))))
|
|
634
|
|
635 (defun set-suffix-learn-mode (mode)
|
|
636 ; (open-wnn-if-disconnected)
|
|
637 (if (null (wnn-server-set-suffix-learn-mode
|
|
638 mode))
|
|
639 (egg:error (wnn-server-get-msg))))
|
|
640
|
|
641 (defun set-common-learn-mode (mode)
|
|
642 ; (open-wnn-if-disconnected)
|
|
643 (if (null (wnn-server-set-common-learn-mode
|
|
644 mode))
|
|
645 (egg:error (wnn-server-get-msg))))
|
|
646
|
|
647 (defun set-freq-func-mode (mode)
|
|
648 ; (open-wnn-if-disconnected)
|
|
649 (if (null (wnn-server-set-freq-func-mode
|
|
650 mode))
|
|
651 (egg:error (wnn-server-get-msg))))
|
|
652
|
|
653 (defun set-numeric-mode (mode)
|
|
654 ; (open-wnn-if-disconnected)
|
|
655 (if (null (wnn-server-set-numeric-mode
|
|
656 mode))
|
|
657 (egg:error (wnn-server-get-msg))))
|
|
658
|
|
659 (defun set-alphabet-mode (mode)
|
|
660 ; (open-wnn-if-disconnected)
|
|
661 (if (null (wnn-server-set-alphabet-mode
|
|
662 mode))
|
|
663 (egg:error (wnn-server-get-msg))))
|
|
664
|
|
665 (defun set-symbol-mode (mode)
|
|
666 ; (open-wnn-if-disconnected)
|
|
667 (if (null (wnn-server-set-symbol-mode
|
|
668 mode))
|
|
669 (egg:error (wnn-server-get-msg))))
|
|
670
|
|
671 (defun set-yuragi-mode (mode)
|
|
672 ; (open-wnn-if-disconnected)
|
|
673 (if (null (wnn-server-set-yuragi-mode
|
|
674 mode))
|
|
675 (egg:error (wnn-server-get-msg))))
|
|
676
|
|
677 (defun wnn6-reset-prev-info ()
|
|
678 ; (open-wnn-if-disconnected)
|
|
679 (if (null (wnn-reset-previous-info))
|
|
680 (egg:error (wnn-server-get-msg))))
|
|
681
|
|
682 ;;;
|
|
683 ;;; WNN interface
|
|
684 ;;;
|
|
685
|
|
686 (defun make-host-list (name list)
|
|
687 (cons name (delete name list)))
|
|
688
|
|
689 (defun set-wnn-host-name (name)
|
114
|
690 "Set egg/wnn to connect to jserver on host NAME, or prompt for it."
|
70
|
691 (interactive "sHost name: ")
|
|
692 (let ((wnn-server-type 'jserver)) (close-wnn))
|
|
693 (setq jserver-list
|
|
694 (make-host-list
|
|
695 name (or jserver-list (list (or wnn-host-name (getenv "JSERVER")))))))
|
|
696
|
|
697 (fset 'set-jserver-host-name (symbol-function 'set-wnn-host-name))
|
|
698
|
|
699 (defun set-cwnn-host-name (name)
|
114
|
700 "Set egg/wnn to connect to cserver on host NAME, or prompt for it."
|
70
|
701 (interactive "sHost name: ")
|
|
702 (let ((wnn-server-type 'cserver)) (close-wnn))
|
|
703 (setq cserver-list
|
|
704 (make-host-list
|
|
705 name (or cserver-list (list (or cwnn-host-name (getenv "CSERVER")))))))
|
|
706
|
|
707 (fset 'set-cserver-host-name (symbol-function 'set-cwnn-host-name))
|
|
708
|
|
709 (defun set-kwnn-host-name (name)
|
114
|
710 "Set egg/wnn to connect to kserver on host NAME, or prompt for it."
|
70
|
711 (interactive "sHost name: ")
|
|
712 (let ((wnn-server-type 'kserver)) (close-wnn))
|
|
713 (setq kserver-list
|
|
714 (make-host-list
|
|
715 name (or kserver-list (list (or kwnn-host-name (getenv "KSERVER")))))))
|
|
716
|
|
717 (fset 'set-kserver-host-name (symbol-function 'set-kwnn-host-name))
|
|
718
|
|
719 (defun open-wnn-if-disconnected ()
|
|
720 (if (null (wnn-server-isconnect))
|
|
721 (let ((hostlist
|
|
722 (cond ((eq wnn-server-type 'jserver)
|
|
723 (or jserver-list
|
|
724 (list (or wnn-host-name (getenv "JSERVER")))))
|
|
725 ((eq wnn-server-type 'cserver)
|
|
726 (or cserver-list
|
|
727 (list (or cwnn-host-name (getenv "CSERVER")))))
|
|
728 ((eq wnn-server-type 'kserver)
|
|
729 (or kserver-list
|
|
730 (list (or kwnn-host-name (getenv "KSERVER")))))))
|
|
731 (loginname (user-login-name)))
|
|
732 (catch 'succ
|
|
733 (while hostlist
|
|
734 (let ((hostname (car hostlist)))
|
|
735 (if (wnn-server-open hostname loginname)
|
|
736 (progn
|
|
737 (cond ((eq wnn-server-type 'jserver)
|
|
738 (setq wnn-host-name hostname))
|
|
739 ((eq wnn-server-type 'cserver)
|
|
740 (setq cwnn-host-name hostname))
|
|
741 ((eq wnn-server-type 'kserver)
|
|
742 (setq kwnn-host-name hostname)))
|
|
743 (throw 'succ hostname))))
|
|
744 (setq hostlist (cdr hostlist)))
|
|
745 (egg:error (wnn-server-get-msg))))))
|
|
746
|
|
747 (defvar egg-default-startup-file "eggrc"
|
|
748 "*Egg startup file name (system default)")
|
|
749
|
|
750 (defvar egg-startup-file ".eggrc"
|
|
751 "*Egg startup file name.")
|
|
752
|
|
753 ;;; 92/6/30, by K.Handa
|
|
754 (defvar egg-startup-file-search-path '("~" ".")
|
|
755 "*List of directories to search for egg-startup-file
|
|
756 whose name defaults to .eggrc.")
|
|
757
|
|
758 (defun egg:search-file (filename searchpath)
|
|
759 (if (file-name-directory filename)
|
|
760 (let ((file (substitute-in-file-name (expand-file-name filename))))
|
|
761 (if (file-exists-p file) file nil))
|
|
762 (catch 'answer
|
|
763 (while searchpath
|
|
764 (let ((path (car searchpath)))
|
|
765 (if (stringp path)
|
|
766 (let ((file (substitute-in-file-name
|
|
767 (expand-file-name filename path))))
|
|
768 (if (file-exists-p file) (throw 'answer file)))))
|
|
769 (setq searchpath (cdr searchpath)))
|
|
770 nil)))
|
|
771
|
|
772 (defun EGG:open-wnn ()
|
|
773 (let ((host (open-wnn-if-disconnected)))
|
|
774 (notify (egg:msg-get 'open-wnn)
|
|
775 (or host "local"))
|
|
776 (let* ((path (append egg-startup-file-search-path load-path))
|
|
777 (eggrc (or (egg:search-file egg-startup-file path)
|
|
778 (egg:search-file egg-default-startup-file load-path))))
|
|
779 (if (or (null skip-wnn-setenv-if-env-exist)
|
|
780 (null (wnn-server-dict-list)))
|
|
781 (if eggrc (load-file eggrc)
|
|
782 (let ((wnnenv-sticky nil)) (wnn-server-close))
|
|
783 (egg:error (egg:msg-get 'no-rcfile) path)))
|
|
784 (run-hooks 'egg:open-wnn-hook))))
|
|
785
|
|
786 (defun disconnect-wnn ()
|
114
|
787 "Dump connection to Wnn servers, discarding dictionary and frequency changes."
|
70
|
788 (interactive)
|
|
789 (if (wnn-server-isconnect) (wnn-server-close)))
|
|
790
|
|
791 (defun close-wnn ()
|
114
|
792 "Cleanly shutdown connection to Wnn servers, saving data and calling egg:close-wnn-hook"
|
70
|
793 (interactive)
|
|
794 (if (wnn-server-isconnect)
|
|
795 (progn
|
|
796 (wnn-server-set-rev nil)
|
|
797 (if (wnn-server-dict-save)
|
|
798 (message (egg:msg-get 'file-saved))
|
|
799 (message (wnn-server-get-msg)))
|
|
800 (sit-for 0)
|
|
801 (wnn-server-set-rev t)
|
|
802 (if (wnn-server-dict-save)
|
|
803 (message (egg:msg-get 'file-saved))
|
|
804 (message (wnn-server-get-msg)))
|
|
805 (sit-for 0)
|
|
806 (wnn-server-close)
|
|
807 (run-hooks 'egg:close-wnn-hook))))
|
|
808
|
|
809 (defun set-wnn-reverse (arg)
|
|
810 ; (open-wnn-if-disconnected)
|
|
811 (wnn-server-set-rev arg))
|
|
812
|
|
813 ;;;
|
|
814 ;;; Kanji henkan
|
|
815 ;;;
|
|
816
|
|
817 (defvar egg:*kanji-kanabuff* nil)
|
|
818 (defvar egg:*dai* t)
|
|
819 (defvar *bunsetu-number* nil)
|
|
820 (defvar *zenkouho-suu* nil)
|
|
821 (defvar *zenkouho-offset* nil)
|
|
822
|
|
823 (defun bunsetu-length-sho (number)
|
|
824 (cdr (wnn-server-bunsetu-yomi number)))
|
|
825
|
|
826 (defun bunsetu-length (number)
|
|
827 (let ((max (wnn-server-dai-end number))
|
|
828 (i (1+ number))
|
|
829 (l (bunsetu-length-sho number)))
|
|
830 (while (< i max)
|
|
831 (setq l (+ l (bunsetu-length-sho i)))
|
|
832 (setq i (1+ i)))
|
|
833 l))
|
|
834
|
|
835 (defun bunsetu-position (number)
|
|
836 (let ((pos egg:*region-start*) (i 0))
|
|
837 (while (< i number)
|
|
838 (setq pos (+ pos (length (bunsetu-kanji i))
|
|
839 (if (wnn-server-dai-top (1+ i))
|
|
840 (length egg:*dai-bunsetu-kugiri*)
|
|
841 (length egg:*sho-bunsetu-kugiri*))))
|
|
842 (setq i (1+ i)))
|
|
843 pos))
|
|
844
|
|
845 (defun bunsetu-kanji (number) (car (wnn-server-bunsetu-kanji number)))
|
|
846
|
|
847 (defun bunsetu-yomi (number) (car (wnn-server-bunsetu-yomi number)))
|
|
848
|
|
849 (defun bunsetu-kouho-suu (bunsetu-number init)
|
|
850 (if (or init (/= (wnn-server-zenkouho-bun) bunsetu-number))
|
|
851 (setq *zenkouho-offset* (wnn-server-zenkouho bunsetu-number egg:*dai*)))
|
|
852 (setq *zenkouho-suu* (wnn-server-zenkouho-suu)))
|
|
853
|
|
854 (defun bunsetu-kouho-list (bunsetu-number init)
|
|
855 (if (or init (/= (wnn-server-zenkouho-bun) bunsetu-number))
|
|
856 (setq *zenkouho-offset* (wnn-server-zenkouho bunsetu-number egg:*dai*)))
|
|
857 (let ((i (1- (setq *zenkouho-suu* (wnn-server-zenkouho-suu))))
|
|
858 (val nil))
|
|
859 (while (<= 0 i)
|
|
860 (setq val (cons (wnn-server-get-zenkouho i) val))
|
|
861 (setq i (1- i)))
|
|
862 val))
|
|
863
|
|
864 (defun bunsetu-kouho-number (bunsetu-number init)
|
|
865 (if (or init (/= (wnn-server-zenkouho-bun) bunsetu-number))
|
|
866 (setq *zenkouho-offset* (wnn-server-zenkouho bunsetu-number egg:*dai*)))
|
|
867 *zenkouho-offset*)
|
|
868
|
|
869 ;;;;
|
|
870 ;;;; User entry : henkan-region, henkan-paragraph, henkan-sentence
|
|
871 ;;;;
|
|
872
|
|
873 (defun egg:henkan-face-on ()
|
98
|
874 ;; Make an extent if henkan extent does not exist.
|
|
875 ;; Move henkan extent to henkan region.
|
70
|
876 (if egg:*henkan-face*
|
|
877 (progn
|
98
|
878 (if (extentp egg:*henkan-extent*)
|
70
|
879 nil
|
98
|
880 ;; ###jhod this was a 'point-type' overlay
|
|
881 (setq egg:*henkan-extent* (make-extent 1 1))
|
|
882 (set-extent-property egg:*henkan-extent* 'face egg:*henkan-face*))
|
|
883 (set-extent-endpoints egg:*henkan-extent* egg:*region-start* egg:*region-end*))))
|
70
|
884
|
|
885 (defun egg:henkan-face-off ()
|
98
|
886 ;; detach henkan extent from the current buffer.
|
70
|
887 (and egg:*henkan-face*
|
98
|
888 (extentp egg:*henkan-extent*)
|
|
889 (delete-extent egg:*henkan-extent*) ))
|
70
|
890
|
|
891
|
|
892 (defun henkan-region (start end)
|
|
893 "Convert a text in the region between START and END from kana to kanji."
|
|
894 (interactive "r")
|
|
895 (if (interactive-p) (set-mark (point))) ;;; to be fixed
|
|
896 (henkan-region-internal start end))
|
|
897
|
|
898 (defun gyaku-henkan-region (start end)
|
|
899 "Convert a text in the region between START and END from kanji to kana."
|
|
900 (interactive "r")
|
|
901 (if (interactive-p) (set-mark (point))) ;;; to be fixed
|
|
902 (henkan-region-internal start end t))
|
|
903
|
|
904 ;(defvar henkan-mode-indicator "$B4A(B")
|
|
905
|
|
906 (defun henkan-region-internal (start end &optional rev)
|
|
907 ;; region $B$r$+$J4A;zJQ49$9$k(B
|
|
908 (if egg:henkan-mode-in-use nil
|
|
909 (let ((finished nil))
|
|
910 (unwind-protect
|
|
911 (progn
|
|
912 (setq egg:henkan-mode-in-use t)
|
|
913 (if (null (wnn-server-isconnect)) (EGG:open-wnn))
|
|
914 (setq egg:*kanji-kanabuff* (buffer-substring start end))
|
|
915 ;;; for Wnn6
|
|
916 (if (and (is-wnn6-server)
|
|
917 (not (and
|
|
918 egg:*henkan-fence-mode*
|
|
919 *in-cont-flag*)))
|
|
920 (progn
|
|
921 (wnn6-reset-prev-info)))
|
|
922
|
|
923 (setq *bunsetu-number* 0)
|
|
924 (setq egg:*dai* t) ; 92.9.8 by T.shingu
|
|
925 (wnn-server-set-rev rev)
|
|
926 (let ((result (wnn-server-henkan-begin egg:*kanji-kanabuff*)))
|
|
927 (if (null result)
|
|
928 (egg:error (wnn-server-get-msg))
|
|
929 (if (> result 0)
|
|
930 (progn
|
|
931 (mode-line-egg-mode-update (egg:msg-get 'henkan-mode-indicator))
|
|
932 (goto-char start)
|
|
933 (or (markerp egg:*region-start*)
|
|
934 (setq egg:*region-start* (make-marker)))
|
|
935 (or (markerp egg:*region-end*)
|
98
|
936 (setq egg:*region-end* (set-marker-insertion-type (make-marker) t)))
|
70
|
937 (if (null (marker-position egg:*region-start*))
|
|
938 (progn
|
|
939 ;;;(setq egg:*global-map-backup* (current-global-map))
|
|
940 (setq egg:*local-map-backup* (current-local-map))
|
|
941 (and (boundp 'disable-undo) (setq disable-undo t))
|
|
942 (delete-region start end)
|
|
943 (goto-char start)
|
|
944 (insert egg:*henkan-open*)
|
|
945 (set-marker egg:*region-start* (point))
|
|
946 (insert egg:*henkan-close*)
|
|
947 (set-marker egg:*region-end* egg:*region-start*)
|
|
948 (goto-char egg:*region-start*)
|
|
949 )
|
|
950 (progn
|
|
951 (egg:fence-face-off)
|
|
952 (delete-region (- egg:*region-start* (length egg:*fence-open*))
|
|
953 egg:*region-start*)
|
|
954 (delete-region egg:*region-end*
|
|
955 (+ egg:*region-end* (length egg:*fence-close*)))
|
|
956 (goto-char egg:*region-start*)
|
|
957 (insert egg:*henkan-open*)
|
|
958 (set-marker egg:*region-start* (point))
|
|
959 (goto-char egg:*region-end*)
|
|
960 (let ((point (point)))
|
|
961 (insert egg:*henkan-close*)
|
|
962 (set-marker egg:*region-end* point))
|
|
963 (goto-char start)
|
|
964 (delete-region start end)
|
|
965 ))
|
|
966 (henkan-insert-kouho 0 result)
|
|
967 (egg:henkan-face-on)
|
|
968 (egg:bunsetu-face-on)
|
|
969 (henkan-goto-bunsetu 0)
|
|
970 ;;;(use-global-map henkan-mode-map)
|
|
971 ;;;(use-local-map nil)
|
|
972 (use-local-map henkan-mode-map)
|
|
973 (run-hooks 'egg:henkan-start-hook)))))
|
|
974 (setq finished t))
|
|
975 (or finished (setq disable-undo nil) (setq egg:henkan-mode-in-use nil)))))
|
|
976 )
|
|
977
|
|
978 (defun henkan-paragraph ()
|
|
979 "Convert the current paragraph from kana to kanji."
|
|
980 (interactive)
|
|
981 (forward-paragraph)
|
|
982 (let ((end (point)))
|
|
983 (backward-paragraph)
|
|
984 (henkan-region-internal (point) end)))
|
|
985
|
|
986 (defun gyaku-henkan-paragraph ()
|
|
987 "Convert the current paragraph from kanji to kana."
|
|
988 (interactive)
|
|
989 (forward-paragraph)
|
|
990 (let ((end (point)))
|
|
991 (backward-paragraph)
|
|
992 (henkan-region-internal (point) end t)))
|
|
993
|
|
994 (defun henkan-sentence ()
|
|
995 "Convert the current sentence from kana to kanji."
|
|
996 (interactive)
|
|
997 (forward-sentence)
|
|
998 (let ((end (point)))
|
|
999 (backward-sentence)
|
|
1000 (henkan-region-internal (point) end)))
|
|
1001
|
|
1002 (defun gyaku-henkan-sentence ()
|
|
1003 "Convert the current sentence from kanji to kana."
|
|
1004 (interactive)
|
|
1005 (forward-sentence)
|
|
1006 (let ((end (point)))
|
|
1007 (backward-sentence)
|
|
1008 (henkan-region-internal (point) end t)))
|
|
1009
|
|
1010 (defun henkan-word ()
|
|
1011 "Convert the current word from kana to kanji."
|
|
1012 (interactive)
|
|
1013 (re-search-backward "\\<" nil t)
|
|
1014 (let ((start (point)))
|
|
1015 (re-search-forward "\\>" nil t)
|
|
1016 (henkan-region-internal start (point))))
|
|
1017
|
|
1018 (defun gyaku-henkan-word ()
|
|
1019 "Convert the current word from kanji to kana."
|
|
1020 (interactive)
|
|
1021 (re-search-backward "\\<" nil t)
|
|
1022 (let ((start (point)))
|
|
1023 (re-search-forward "\\>" nil t)
|
|
1024 (henkan-region-internal start (point) t)))
|
|
1025
|
|
1026 ;;;
|
|
1027 ;;; Kana Kanji Henkan Henshuu mode
|
|
1028 ;;;
|
|
1029
|
|
1030 (defun set-egg-henkan-mode-format (open close kugiri-dai kugiri-sho
|
|
1031 &optional henkan-face dai-bunsetu-face sho-bunsetu-face)
|
|
1032 "$BJQ49(B mode $B$NI=<(J}K!$r@_Dj$9$k!#(BOPEN $B$OJQ49$N;OE@$r<($9J8;zNs$^$?$O(B nil$B!#(B
|
|
1033 CLOSE$B$OJQ49$N=*E@$r<($9J8;zNs$^$?$O(B nil$B!#(B
|
|
1034 KUGIRI-DAI$B$OBgJ8@a$N6h@Z$j$rI=<($9$kJ8;zNs$^$?$O(B nil$B!#(B
|
|
1035 KUGIRI-SHO$B$O>.J8@a$N6h@Z$j$rI=<($9$kJ8;zNs$^$?$O(B nil$B!#(B
|
|
1036 optional HENKAN-FACE $B$OJQ496h4V$rI=<($9$k(B face $B$^$?$O(B nil
|
|
1037 optional DAI-BUNSETU-FACE $B$OBgJ8@a6h4V$rI=<($9$k(B face $B$^$?$O(B nil
|
|
1038 optional SHO-BUNSETU-FACE $B$O>.J8@a6h4V$rI=<($9$k(B face $B$^$?$O(B nil"
|
|
1039
|
|
1040 (interactive (list (read-string (egg:msg-get 'begin-henkan))
|
|
1041 (read-string (egg:msg-get 'end-henkan))
|
|
1042 (read-string (egg:msg-get 'kugiri-dai))
|
|
1043 (read-string (egg:msg-get 'kugiri-sho))
|
|
1044 (cdr (assoc (completing-read (egg:msg-get 'face-henkan)
|
|
1045 egg:*face-alist*)
|
|
1046 egg:*face-alist*))
|
|
1047 (cdr (assoc (completing-read (egg:msg-get 'face-dai)
|
|
1048 egg:*face-alist*)
|
|
1049 egg:*face-alist*))
|
|
1050 (cdr (assoc (completing-read (egg:msg-get 'face-sho)
|
|
1051 egg:*face-alist*)
|
|
1052 egg:*face-alist*))
|
|
1053 ))
|
|
1054 (if (or (stringp open) (null open))
|
|
1055 (setq egg:*henkan-open* open)
|
|
1056 (egg:error "Wrong type of arguments(open): %s" open))
|
|
1057
|
|
1058 (if (or (stringp close) (null close))
|
|
1059 (setq egg:*henkan-close* close)
|
|
1060 (egg:error "Wrong type of arguments(close): %s" close))
|
|
1061
|
|
1062 (if (or (stringp kugiri-dai) (null kugiri-dai))
|
|
1063 (setq egg:*dai-bunsetu-kugiri* (or kugiri-dai ""))
|
|
1064 (egg:error "Wrong type of arguments(kugiri-dai): %s" kugiri-dai))
|
|
1065
|
|
1066 (if (or (stringp kugiri-sho) (null kugiri-sho))
|
|
1067 (setq egg:*sho-bunsetu-kugiri* (or kugiri-sho ""))
|
|
1068 (egg:error "Wrong type of arguments(kugiri-sho): %s" kugiri-sho))
|
|
1069
|
|
1070 (if (or (null henkan-face) (memq henkan-face (face-list)))
|
|
1071 (progn
|
|
1072 (setq egg:*henkan-face* henkan-face)
|
98
|
1073 (if (extentp egg:*henkan-extent*)
|
|
1074 (set-extent-property egg:*henkan-extent* 'face egg:*henkan-face*)))
|
70
|
1075 (egg:error "Wrong type of arguments(henkan-face): %s" henkan-face))
|
|
1076
|
|
1077 (if (or (null dai-bunsetu-face) (memq dai-bunsetu-face (face-list)))
|
|
1078 (progn
|
|
1079 (setq egg:*dai-bunsetu-face* dai-bunsetu-face)
|
98
|
1080 (if (extentp egg:*dai-bunsetu-extent*)
|
|
1081 (set-extent-property egg:*dai-bunsetu-extent* 'face egg:*dai-bunsetu-face*)))
|
70
|
1082 (egg:error "Wrong type of arguments(dai-bunsetu-face): %s" dai-bunsetu-face))
|
|
1083
|
|
1084 (if (or (null sho-bunsetu-face) (memq sho-bunsetu-face (face-list)))
|
|
1085 (progn
|
|
1086 (setq egg:*sho-bunsetu-face* sho-bunsetu-face)
|
98
|
1087 (if (extentp egg:*sho-bunsetu-extent*)
|
|
1088 (set-extent-property egg:*sho-bunsetu-extent* 'face egg:*sho-bunsetu-face*)))
|
70
|
1089 (egg:error "Wrong type of arguments(sho-bunsetu-face): %s" sho-bunsetu-face))
|
|
1090 )
|
|
1091
|
|
1092 (defun henkan-insert-kouho (start number)
|
|
1093 (let ((i start))
|
|
1094 (while (< i number)
|
|
1095 (insert (car (wnn-server-bunsetu-kanji i))
|
|
1096 (if (= (1+ i) number)
|
|
1097 ""
|
|
1098 (if (wnn-server-dai-top (1+ i))
|
|
1099 egg:*dai-bunsetu-kugiri*
|
|
1100 egg:*sho-bunsetu-kugiri*)))
|
|
1101 (setq i (1+ i)))))
|
|
1102
|
|
1103 (defun henkan-kakutei ()
|
114
|
1104 "Accept the current henkan region"
|
70
|
1105 (interactive)
|
|
1106 (egg:bunsetu-face-off)
|
|
1107 (egg:henkan-face-off)
|
|
1108 (delete-region (- egg:*region-start* (length egg:*henkan-open*))
|
|
1109 egg:*region-start*)
|
|
1110 (delete-region egg:*region-start* egg:*region-end*)
|
|
1111 (delete-region egg:*region-end* (+ egg:*region-end* (length egg:*henkan-close*)))
|
|
1112 (goto-char egg:*region-start*)
|
|
1113 (setq egg:*sai-henkan-start* (point))
|
|
1114 (let ((i 0) (max (wnn-server-bunsetu-suu)))
|
|
1115 (setq egg:*old-bunsetu-suu* max)
|
|
1116 (while (< i max)
|
|
1117 (insert (car (wnn-server-bunsetu-kanji i )))
|
|
1118 (if (not overwrite-mode)
|
|
1119 (undo-boundary))
|
|
1120 (setq i (1+ i))
|
|
1121 ))
|
|
1122 (setq egg:*sai-henkan-end* (point))
|
|
1123 (wnn-server-hindo-update)
|
|
1124 (setq egg:henkan-mode-in-use nil)
|
|
1125 (egg:quit-egg-mode)
|
|
1126 (run-hooks 'egg:henkan-end-hook)
|
|
1127 )
|
|
1128
|
|
1129 ;; 92.7.10 by K.Handa
|
|
1130 (defun henkan-kakutei-first-char ()
|
|
1131 "$B3NDjJ8;zNs$N:G=i$N0lJ8;z$@$1A^F~$9$k!#(B"
|
|
1132 (interactive)
|
|
1133 (egg:bunsetu-face-off)
|
|
1134 (egg:henkan-face-off)
|
|
1135 (delete-region (- egg:*region-start* (length egg:*henkan-open*))
|
|
1136 egg:*region-start*)
|
|
1137 (delete-region egg:*region-start* egg:*region-end*)
|
|
1138 (delete-region egg:*region-end* (+ egg:*region-end*
|
|
1139 ;; 92.8.5 by Y.Kasai
|
|
1140 (length egg:*henkan-close*)))
|
|
1141 (goto-char egg:*region-start*)
|
|
1142 (insert (car (wnn-server-bunsetu-kanji 0)))
|
|
1143 (if (not overwrite-mode)
|
|
1144 (undo-boundary))
|
|
1145 (goto-char egg:*region-start*)
|
|
1146 (forward-char 1)
|
|
1147 (delete-region (point) egg:*region-end*)
|
|
1148 (wnn-server-hindo-update)
|
|
1149 (setq egg:henkan-mode-in-use nil)
|
|
1150 (egg:quit-egg-mode)
|
|
1151 )
|
|
1152 ;; end of patch
|
|
1153
|
|
1154 (defun henkan-kakutei-before-point ()
|
114
|
1155 "Accept the henkan region before point, and put the rest back into a fence."
|
70
|
1156 (interactive)
|
|
1157 (egg:bunsetu-face-off)
|
|
1158 (egg:henkan-face-off)
|
|
1159 (delete-region egg:*region-start* egg:*region-end*)
|
|
1160 (goto-char egg:*region-start*)
|
|
1161 (let ((i 0) (max *bunsetu-number*))
|
|
1162 (while (< i max)
|
|
1163 (insert (car (wnn-server-bunsetu-kanji i )))
|
|
1164 (if (not overwrite-mode)
|
|
1165 (undo-boundary))
|
|
1166 (setq i (1+ i))
|
|
1167 ))
|
|
1168 (wnn-server-hindo-update *bunsetu-number*)
|
|
1169 (delete-region (- egg:*region-start* (length egg:*henkan-open*))
|
|
1170 egg:*region-start*)
|
|
1171 (insert egg:*fence-open*)
|
|
1172 (set-marker egg:*region-start* (point))
|
|
1173 (delete-region egg:*region-end* (+ egg:*region-end* (length egg:*henkan-close*)))
|
|
1174 (goto-char egg:*region-end*)
|
|
1175 (let ((point (point)))
|
|
1176 (insert egg:*fence-close*)
|
|
1177 (set-marker egg:*region-end* point))
|
|
1178 (goto-char egg:*region-start*)
|
|
1179 (egg:fence-face-on)
|
|
1180 (let ((point (point))
|
|
1181 (i *bunsetu-number*) (max (wnn-server-bunsetu-suu)))
|
|
1182 (while (< i max)
|
|
1183 (insert (car (wnn-server-bunsetu-yomi i)))
|
|
1184 (setq i (1+ i)))
|
|
1185 ;;;(insert "|")
|
|
1186 ;;;(insert egg:*fence-close*)
|
|
1187 ;;;(set-marker egg:*region-end* (point))
|
|
1188 (goto-char point))
|
|
1189 (setq egg:*mode-on* t)
|
|
1190 ;;;(use-global-map fence-mode-map)
|
|
1191 ;;;(use-local-map nil)
|
|
1192 (setq egg:henkan-mode-in-use nil)
|
|
1193 (use-local-map fence-mode-map)
|
|
1194 (egg:mode-line-display))
|
|
1195
|
114
|
1196 ;; ### Should probably put this on a key.
|
70
|
1197 (defun sai-henkan ()
|
114
|
1198 "Reconvert last henkan entry."
|
70
|
1199 (interactive)
|
|
1200 (if egg:henkan-mode-in-use nil
|
|
1201 (let ((finished nil))
|
|
1202 (unwind-protect
|
|
1203 (progn
|
|
1204 (setq egg:henkan-mode-in-use t)
|
|
1205 (mode-line-egg-mode-update (egg:msg-get 'henkan-mode-indicator))
|
|
1206 (goto-char egg:*sai-henkan-start*)
|
|
1207 (setq egg:*local-map-backup* (current-local-map))
|
|
1208 (and (boundp 'disable-undo) (setq disable-undo t))
|
|
1209 (delete-region egg:*sai-henkan-start* egg:*sai-henkan-end*)
|
|
1210 (goto-char egg:*sai-henkan-start*)
|
|
1211 (insert egg:*henkan-open*)
|
|
1212 (set-marker egg:*region-start* (point))
|
|
1213 (insert egg:*henkan-close*)
|
|
1214 (set-marker egg:*region-end* egg:*region-start*)
|
|
1215 (goto-char egg:*region-start*)
|
|
1216 (henkan-insert-kouho 0 egg:*old-bunsetu-suu*)
|
|
1217 (egg:henkan-face-on)
|
|
1218 (egg:bunsetu-face-on)
|
|
1219 (henkan-goto-bunsetu 0)
|
|
1220 (use-local-map henkan-mode-map)
|
|
1221 (setq finished t))
|
|
1222 (or finished (setq disable-undo nil) (setq egg:henkan-mode-in-use nil)))))
|
|
1223 )
|
|
1224
|
|
1225 (defun egg:bunsetu-face-on ()
|
98
|
1226 ;; make dai-bunsetu extent and sho-bunsetu extent if they do not exist.
|
|
1227 ;; put thier faces to extents and move them to each bunsetu.
|
70
|
1228 (let* ((bunsetu-begin *bunsetu-number*)
|
114
|
1229 (bunsetu-end))
|
|
1230 ; (bunsetu-suu (wnn-server-bunsetu-suu)))
|
70
|
1231 ; dai bunsetu
|
|
1232 (if egg:*dai-bunsetu-face*
|
|
1233 (progn
|
98
|
1234 (if (extentp egg:*dai-bunsetu-extent*)
|
70
|
1235 nil
|
98
|
1236 (setq egg:*dai-bunsetu-extent* (make-extent 1 1))
|
|
1237 (set-extent-property egg:*dai-bunsetu-extent* 'face egg:*dai-bunsetu-face*))
|
70
|
1238 (setq bunsetu-end (wnn-server-dai-end *bunsetu-number*))
|
|
1239 (while (not (wnn-server-dai-top bunsetu-begin))
|
|
1240 (setq bunsetu-begin (1- bunsetu-begin)))
|
98
|
1241 (set-extent-endpoints egg:*dai-bunsetu-extent*
|
70
|
1242 (bunsetu-position bunsetu-begin)
|
|
1243 (+ (bunsetu-position (1- bunsetu-end))
|
|
1244 (length (bunsetu-kanji (1- bunsetu-end)))))))
|
|
1245 ; sho bunsetu
|
|
1246 (if egg:*sho-bunsetu-face*
|
|
1247 (progn
|
98
|
1248 (if (extentp egg:*sho-bunsetu-extent*)
|
70
|
1249 nil
|
98
|
1250 (setq egg:*sho-bunsetu-extent* (make-extent 1 1))
|
|
1251 (set-extent-property egg:*sho-bunsetu-extent* 'face egg:*sho-bunsetu-face*))
|
70
|
1252 (setq bunsetu-end (1+ *bunsetu-number*))
|
98
|
1253 (set-extent-endpoints egg:*sho-bunsetu-extent*
|
70
|
1254 (let ((point (bunsetu-position *bunsetu-number*)))
|
98
|
1255 ;; ###jhod Removed the char-boundary stuff, as I *THINK* we can only move by whole chars...
|
|
1256 ;; (if (eq egg:*sho-bunsetu-face* 'modeline)
|
|
1257 ;; (+ point (1+ (char-boundary-p point)))
|
|
1258 ;; point))
|
70
|
1259 (if (eq egg:*sho-bunsetu-face* 'modeline)
|
98
|
1260 (+ point 1)
|
70
|
1261 point))
|
98
|
1262
|
70
|
1263 (+ (bunsetu-position (1- bunsetu-end))
|
|
1264 (length (bunsetu-kanji (1- bunsetu-end)))))))))
|
|
1265
|
|
1266 (defun egg:bunsetu-face-off ()
|
|
1267 (and egg:*dai-bunsetu-face*
|
98
|
1268 (extentp egg:*dai-bunsetu-extent*)
|
|
1269 (delete-extent egg:*dai-bunsetu-extent*))
|
70
|
1270 (and egg:*sho-bunsetu-face*
|
98
|
1271 (extentp egg:*sho-bunsetu-extent*)
|
|
1272 (delete-extent egg:*sho-bunsetu-extent*))
|
70
|
1273 )
|
|
1274
|
|
1275 (defun henkan-goto-bunsetu (number)
|
|
1276 (setq *bunsetu-number*
|
|
1277 (check-number-range number 0 (1- (wnn-server-bunsetu-suu))))
|
|
1278 (goto-char (bunsetu-position *bunsetu-number*))
|
98
|
1279 ; (egg:move-bunsetu-extent)
|
70
|
1280 (egg:bunsetu-face-on)
|
|
1281 )
|
|
1282
|
|
1283 (defun henkan-forward-bunsetu ()
|
|
1284 (interactive)
|
|
1285 (henkan-goto-bunsetu (1+ *bunsetu-number*))
|
|
1286 )
|
|
1287
|
|
1288 (defun henkan-backward-bunsetu ()
|
|
1289 (interactive)
|
|
1290 (henkan-goto-bunsetu (1- *bunsetu-number*))
|
|
1291 )
|
|
1292
|
|
1293 (defun henkan-first-bunsetu ()
|
|
1294 (interactive)
|
|
1295 (henkan-goto-bunsetu 0))
|
|
1296
|
|
1297 (defun henkan-last-bunsetu ()
|
|
1298 (interactive)
|
|
1299 (henkan-goto-bunsetu (1- (wnn-server-bunsetu-suu)))
|
|
1300 )
|
|
1301
|
|
1302 (defun check-number-range (i min max)
|
|
1303 (cond((< i min) max)
|
|
1304 ((< max i) min)
|
|
1305 (t i)))
|
|
1306
|
|
1307 (defun henkan-hiragana ()
|
|
1308 (interactive)
|
|
1309 (henkan-goto-kouho (- (bunsetu-kouho-suu *bunsetu-number* nil) 1)))
|
|
1310
|
|
1311 (defun henkan-katakana ()
|
|
1312 (interactive)
|
|
1313 (henkan-goto-kouho (- (bunsetu-kouho-suu *bunsetu-number* nil) 2)))
|
|
1314
|
|
1315 (defun henkan-next-kouho ()
|
|
1316 (interactive)
|
|
1317 (henkan-goto-kouho (1+ (bunsetu-kouho-number *bunsetu-number* nil))))
|
|
1318
|
|
1319 (defun henkan-next-kouho-dai ()
|
|
1320 (interactive)
|
|
1321 (let ((init (not egg:*dai*)))
|
|
1322 (setq egg:*dai* t)
|
|
1323 (henkan-goto-kouho (1+ (bunsetu-kouho-number *bunsetu-number* init)))))
|
|
1324
|
|
1325 (defun henkan-next-kouho-sho ()
|
|
1326 (interactive)
|
|
1327 (let ((init egg:*dai*))
|
|
1328 (setq egg:*dai* nil)
|
|
1329 (henkan-goto-kouho (1+ (bunsetu-kouho-number *bunsetu-number* init)))))
|
|
1330
|
|
1331 (defun henkan-previous-kouho ()
|
|
1332 (interactive)
|
|
1333 (henkan-goto-kouho (1- (bunsetu-kouho-number *bunsetu-number* nil))))
|
|
1334
|
|
1335 (defun henkan-previous-kouho-dai ()
|
|
1336 (interactive)
|
|
1337 (let ((init (not egg:*dai*)))
|
|
1338 (setq egg:*dai* t)
|
|
1339 (henkan-goto-kouho (1- (bunsetu-kouho-number *bunsetu-number* init)))))
|
|
1340
|
|
1341 (defun henkan-previous-kouho-sho ()
|
|
1342 (interactive)
|
|
1343 (let ((init egg:*dai*))
|
|
1344 (setq egg:*dai* nil)
|
|
1345 (henkan-goto-kouho (1- (bunsetu-kouho-number *bunsetu-number* init)))))
|
|
1346
|
|
1347 (defun henkan-goto-kouho (kouho-number)
|
|
1348 ; (egg:bunsetu-face-off)
|
|
1349 (let ((point (point))
|
114
|
1350 ; (yomi (bunsetu-yomi *bunsetu-number*))
|
70
|
1351 (max)
|
|
1352 (min))
|
|
1353 (setq kouho-number
|
|
1354 (check-number-range kouho-number
|
|
1355 0
|
|
1356 (1- (length (bunsetu-kouho-list
|
|
1357 *bunsetu-number* nil)))))
|
|
1358 (setq *zenkouho-offset* kouho-number)
|
|
1359 (wnn-server-henkan-kakutei kouho-number egg:*dai*)
|
|
1360 (setq max (wnn-server-bunsetu-suu))
|
|
1361 (setq min (max 0 (1- *bunsetu-number*)))
|
|
1362 (delete-region
|
|
1363 (bunsetu-position min) egg:*region-end*)
|
|
1364 (goto-char (bunsetu-position min))
|
|
1365 (henkan-insert-kouho min max)
|
|
1366 (goto-char point))
|
98
|
1367 ; (egg:move-bunsetu-extent)
|
70
|
1368 (egg:bunsetu-face-on)
|
|
1369 (egg:henkan-face-on)
|
|
1370 )
|
|
1371
|
|
1372 (defun henkan-bunsetu-chijime-dai ()
|
|
1373 (interactive)
|
|
1374 (setq egg:*dai* t)
|
|
1375 (or (= (bunsetu-length *bunsetu-number*) 1)
|
|
1376 (bunsetu-length-henko (1- (bunsetu-length *bunsetu-number*)))))
|
|
1377
|
|
1378 (defun henkan-bunsetu-chijime-sho ()
|
|
1379 (interactive)
|
|
1380 (setq egg:*dai* nil)
|
|
1381 (or (= (bunsetu-length-sho *bunsetu-number*) 1)
|
|
1382 (bunsetu-length-henko (1- (bunsetu-length-sho *bunsetu-number*)))))
|
|
1383
|
|
1384 (defun henkan-bunsetu-nobasi-dai ()
|
|
1385 (interactive)
|
|
1386 (setq egg:*dai* t)
|
|
1387 (let ((i *bunsetu-number*)
|
|
1388 (max (wnn-server-bunsetu-suu))
|
|
1389 (len (bunsetu-length *bunsetu-number*))
|
|
1390 (maxlen 0))
|
|
1391 (while (< i max)
|
|
1392 (setq maxlen (+ maxlen (cdr (wnn-server-bunsetu-yomi i))))
|
|
1393 (setq i (1+ i)))
|
|
1394 (if (not (= len maxlen))
|
|
1395 (bunsetu-length-henko (1+ len)))))
|
|
1396
|
|
1397 (defun henkan-bunsetu-nobasi-sho ()
|
|
1398 (interactive)
|
|
1399 (setq egg:*dai* nil)
|
|
1400 (let ((i *bunsetu-number*)
|
|
1401 (max (wnn-server-bunsetu-suu))
|
|
1402 (len (bunsetu-length-sho *bunsetu-number*))
|
|
1403 (maxlen 0))
|
|
1404 (while (< i max)
|
|
1405 (setq maxlen (+ maxlen (cdr (wnn-server-bunsetu-yomi i))))
|
|
1406 (setq i (1+ i)))
|
|
1407 (if (not (= len maxlen))
|
|
1408 (bunsetu-length-henko (1+ len)))))
|
|
1409
|
|
1410 ; (if (not (= (1+ *bunsetu-number*) (wnn-server-bunsetu-suu)))
|
|
1411 ; (bunsetu-length-henko (1+ (bunsetu-length *bunsetu-number*)))))
|
|
1412
|
|
1413
|
|
1414 (defun henkan-saishou-bunsetu ()
|
|
1415 (interactive)
|
|
1416 (bunsetu-length-henko 1))
|
|
1417
|
|
1418 (defun henkan-saichou-bunsetu ()
|
|
1419 (interactive)
|
|
1420 (let ((max (wnn-server-bunsetu-suu)) (i *bunsetu-number*)
|
|
1421 (l 0))
|
|
1422 (while (< i max)
|
|
1423 (setq l (+ l (bunsetu-length-sho i)))
|
|
1424 (setq i (1+ i)))
|
|
1425 (bunsetu-length-henko l)))
|
|
1426
|
|
1427 (defun bunsetu-length-henko (length)
|
114
|
1428 (let ((r (wnn-server-bunsetu-henkou *bunsetu-number* length egg:*dai*))
|
70
|
1429 (start (max 0 (1- *bunsetu-number*))))
|
|
1430 (cond((null r)
|
|
1431 (egg:error (wnn-server-get-msg)))
|
|
1432 ((> r 0)
|
|
1433 ; (egg:henkan-face-off)
|
|
1434 ; (egg:bunsetu-face-off)
|
|
1435 (delete-region
|
|
1436 (bunsetu-position start) egg:*region-end*)
|
|
1437 (goto-char (bunsetu-position start))
|
|
1438 (henkan-insert-kouho start r)
|
|
1439 (henkan-goto-bunsetu *bunsetu-number*)))))
|
|
1440
|
|
1441 (defun henkan-quit ()
|
|
1442 (interactive)
|
|
1443 (egg:bunsetu-face-off)
|
|
1444 (egg:henkan-face-off)
|
|
1445 (delete-region (- egg:*region-start* (length egg:*henkan-open*))
|
|
1446 egg:*region-start*)
|
|
1447 (delete-region egg:*region-start* egg:*region-end*)
|
|
1448 (delete-region egg:*region-end* (+ egg:*region-end* (length egg:*henkan-close*)))
|
|
1449 (goto-char egg:*region-start*)
|
|
1450 (insert egg:*fence-open*)
|
|
1451 (set-marker egg:*region-start* (point))
|
|
1452 (insert egg:*kanji-kanabuff*)
|
|
1453 (let ((point (point)))
|
|
1454 (insert egg:*fence-close*)
|
|
1455 (set-marker egg:*region-end* point)
|
|
1456 )
|
|
1457 (goto-char egg:*region-end*)
|
|
1458 (egg:fence-face-on)
|
|
1459 (wnn-server-henkan-quit)
|
|
1460 (setq egg:*mode-on* t)
|
|
1461 ;;;(use-global-map fence-mode-map)
|
|
1462 ;;;(use-local-map nil)
|
|
1463 (setq egg:henkan-mode-in-use nil)
|
|
1464 (use-local-map fence-mode-map)
|
|
1465 (egg:mode-line-display)
|
|
1466 )
|
|
1467
|
|
1468 (defun henkan-select-kouho (init)
|
|
1469 (if (not (eq (selected-window) (minibuffer-window)))
|
|
1470 (let ((kouho-list (bunsetu-kouho-list *bunsetu-number* init))
|
|
1471 menu)
|
|
1472 (setq menu
|
|
1473 (list 'menu (egg:msg-get 'jikouho)
|
|
1474 (let ((l kouho-list) (r nil) (i 0))
|
|
1475 (while l
|
|
1476 (setq r (cons (cons (car l) i) r))
|
|
1477 (setq i (1+ i))
|
|
1478 (setq l (cdr l)))
|
|
1479 (reverse r))))
|
|
1480 (henkan-goto-kouho
|
|
1481 (menu:select-from-menu menu
|
|
1482 (bunsetu-kouho-number *bunsetu-number* nil))))
|
|
1483 (beep)))
|
|
1484
|
|
1485 (defun henkan-select-kouho-dai ()
|
|
1486 (interactive)
|
|
1487 (let ((init (not egg:*dai*)))
|
|
1488 (setq egg:*dai* t)
|
|
1489 (henkan-select-kouho init)))
|
|
1490
|
|
1491 (defun henkan-select-kouho-sho ()
|
|
1492 (interactive)
|
|
1493 (let ((init egg:*dai*))
|
|
1494 (setq egg:*dai* nil)
|
|
1495 (henkan-select-kouho init)))
|
|
1496
|
|
1497 (defun henkan-word-off ()
|
|
1498 (interactive)
|
|
1499 (let ((info (wnn-server-inspect *bunsetu-number*)))
|
|
1500 (if (null info)
|
|
1501 (notify (wnn-server-get-msg))
|
|
1502 (progn
|
|
1503 (let ((dic-list (wnn-server-dict-list)))
|
|
1504 (if (null dic-list)
|
|
1505 (notify (wnn-server-get-msg))
|
|
1506 (progn
|
|
1507 (let* ((kanji (nth 0 info))
|
|
1508 (yomi (nth 1 info))
|
|
1509 (serial (nth 3 info))
|
|
1510 (jisho-no (nth 2 info))
|
|
1511 (jisho-name (nth 2 (assoc jisho-no dic-list))))
|
|
1512 (if (wnn-server-word-use jisho-no serial)
|
|
1513 (notify (egg:msg-get 'off-msg)
|
|
1514 kanji yomi jisho-name serial)
|
|
1515 (egg:error (wnn-server-get-msg)))))))))))
|
|
1516
|
|
1517 (defun henkan-kakutei-and-self-insert ()
|
|
1518 (interactive)
|
|
1519 (setq unread-command-events (list last-command-event))
|
|
1520 (henkan-kakutei))
|
|
1521
|
|
1522 (defvar henkan-mode-map (make-keymap))
|
|
1523 (defvar henkan-mode-esc-map (make-keymap))
|
|
1524
|
|
1525 (define-key henkan-mode-map [t] 'undefined)
|
|
1526 (define-key henkan-mode-esc-map [t] 'undefined)
|
|
1527
|
|
1528 (let ((ch 0))
|
|
1529 (while (<= ch 127)
|
|
1530 (define-key henkan-mode-map (char-to-string ch) 'undefined)
|
|
1531 (define-key henkan-mode-esc-map (char-to-string ch) 'undefined)
|
|
1532 (setq ch (1+ ch))))
|
|
1533
|
|
1534 (let ((ch 32))
|
|
1535 (while (< ch 127)
|
|
1536 (define-key henkan-mode-map (char-to-string ch) 'henkan-kakutei-and-self-insert)
|
|
1537 (setq ch (1+ ch))))
|
|
1538
|
|
1539 (define-key henkan-mode-map "\e" henkan-mode-esc-map)
|
|
1540 (define-key henkan-mode-map [escape] henkan-mode-esc-map)
|
|
1541 ;(define-key henkan-mode-map "\ei" 'henkan-inspect-bunsetu)
|
|
1542 (define-key henkan-mode-map "\ei" 'henkan-bunsetu-chijime-sho)
|
|
1543 (define-key henkan-mode-map "\eo" 'henkan-bunsetu-nobasi-sho)
|
|
1544 (define-key henkan-mode-map "\es" 'henkan-select-kouho-dai)
|
|
1545 (define-key henkan-mode-map "\eh" 'henkan-hiragana)
|
|
1546 (define-key henkan-mode-map "\ek" 'henkan-katakana)
|
|
1547 (define-key henkan-mode-map "\ez" 'henkan-select-kouho-sho)
|
|
1548 (define-key henkan-mode-map "\e<" 'henkan-saishou-bunsetu)
|
|
1549 (define-key henkan-mode-map "\e>" 'henkan-saichou-bunsetu)
|
|
1550 ;(define-key henkan-mode-map " " 'henkan-next-kouho-dai)
|
|
1551 ; 92.9.8 by T.Shingu
|
|
1552 (define-key henkan-mode-map " " 'henkan-next-kouho)
|
|
1553 ; 92.7.10 by K.Handa
|
|
1554 (define-key henkan-mode-map "\C-@" 'henkan-kakutei-first-char)
|
|
1555 (define-key henkan-mode-map [?\C-\ ] 'henkan-kakutei-first-char)
|
|
1556 (define-key henkan-mode-map "\C-a" 'henkan-first-bunsetu)
|
|
1557 (define-key henkan-mode-map "\C-b" 'henkan-backward-bunsetu)
|
|
1558 (define-key henkan-mode-map "\C-c" 'henkan-quit)
|
|
1559 (define-key henkan-mode-map "\C-e" 'henkan-last-bunsetu)
|
|
1560 (define-key henkan-mode-map "\C-f" 'henkan-forward-bunsetu)
|
|
1561 (define-key henkan-mode-map "\C-g" 'henkan-quit)
|
|
1562 (define-key henkan-mode-map "\C-h" 'henkan-help-command)
|
|
1563 (define-key henkan-mode-map "\C-i" 'henkan-bunsetu-chijime-dai)
|
|
1564 (define-key henkan-mode-map "\C-k" 'henkan-kakutei-before-point)
|
|
1565 (define-key henkan-mode-map "\C-l" 'henkan-kakutei)
|
|
1566 (define-key henkan-mode-map "\C-m" 'henkan-kakutei)
|
|
1567 (define-key henkan-mode-map [return] 'henkan-kakutei)
|
|
1568 (define-key henkan-mode-map "\C-n" 'henkan-next-kouho)
|
|
1569 (define-key henkan-mode-map "\C-o" 'henkan-bunsetu-nobasi-dai)
|
|
1570 (define-key henkan-mode-map "\C-p" 'henkan-previous-kouho)
|
|
1571 (define-key henkan-mode-map "\C-t" 'toroku-henkan-mode)
|
|
1572 (define-key henkan-mode-map "\C-u" 'undefined)
|
|
1573 (define-key henkan-mode-map "\C-v" 'henkan-inspect-bunsetu)
|
|
1574 (define-key henkan-mode-map "\C-w" 'henkan-next-kouho-dai)
|
|
1575 (define-key henkan-mode-map "\C-z" 'henkan-next-kouho-sho)
|
|
1576 (define-key henkan-mode-map "\177" 'henkan-quit)
|
|
1577 (define-key henkan-mode-map [delete] 'henkan-quit)
|
|
1578 (define-key henkan-mode-map [backspace] 'henkan-quit)
|
|
1579 (define-key henkan-mode-map [right] 'henkan-forward-bunsetu)
|
|
1580 (define-key henkan-mode-map [left] 'henkan-backward-bunsetu)
|
|
1581 (define-key henkan-mode-map [down] 'henkan-next-kouho)
|
|
1582 (define-key henkan-mode-map [up] 'henkan-previous-kouho)
|
|
1583
|
|
1584 (defun henkan-help-command ()
|
|
1585 "Display documentation for henkan-mode."
|
|
1586 (interactive)
|
|
1587 (let ((buf "*Help*"))
|
|
1588 (if (eq (get-buffer buf) (current-buffer))
|
|
1589 (henkan-quit)
|
|
1590 (with-output-to-temp-buffer buf
|
|
1591 ;;(princ (substitute-command-keys henkan-mode-document-string))
|
|
1592 (princ (substitute-command-keys (egg:msg-get 'henkan-help)))
|
|
1593 (print-help-return-message)))))
|
|
1594
|
|
1595 ;;;----------------------------------------------------------------------
|
|
1596 ;;;
|
|
1597 ;;; Dictionary management Facility
|
|
1598 ;;;
|
|
1599 ;;;----------------------------------------------------------------------
|
|
1600
|
|
1601 ;;;
|
|
1602 ;;; $B<-=qEPO?(B
|
|
1603 ;;;
|
|
1604
|
|
1605 ;;;;
|
|
1606 ;;;; User entry: toroku-region
|
|
1607 ;;;;
|
|
1608
|
|
1609 (defun remove-regexp-in-string (regexp string)
|
|
1610 (cond((not(string-match regexp string))
|
|
1611 string)
|
|
1612 (t(let ((str nil)
|
|
1613 (ostart 0)
|
|
1614 (oend (match-beginning 0))
|
|
1615 (nstart (match-end 0)))
|
|
1616 (setq str (concat str (substring string ostart oend)))
|
|
1617 (while (string-match regexp string nstart)
|
|
1618 (setq ostart nstart)
|
|
1619 (setq oend (match-beginning 0))
|
|
1620 (setq nstart (match-end 0))
|
|
1621 (setq str (concat str (substring string ostart oend))))
|
|
1622 (concat str (substring string nstart))))))
|
|
1623
|
|
1624 (defun hinsi-from-menu (dict-number name)
|
|
1625 (let ((result (wnn-server-hinsi-list dict-number name))
|
|
1626 ; (hinsi-pair)
|
|
1627 (menu))
|
|
1628 (if (null result)
|
|
1629 (egg:error (wnn-server-get-msg))
|
|
1630 (if (eq result 0)
|
|
1631 name
|
|
1632 (progn
|
|
1633 ; (setq hinsi-pair (mapcar '(lambda (x) (cons x x)) result))
|
|
1634 ; (if (null (string= name "/"))
|
|
1635 ; (setq hinsi-pair (cons (cons "/" "/") hinsi-pair)))
|
|
1636 ; (setq menu (list 'menu (egg:msg-get 'hinsimei) hinsi-pair))
|
|
1637 (setq menu (list 'menu (egg:msg-get 'hinsimei)
|
|
1638 (if (string= name "/")
|
|
1639 result
|
|
1640 (cons "/" result))))
|
|
1641 (hinsi-from-menu dict-number
|
|
1642 (menu:select-from-menu menu)))))))
|
|
1643
|
|
1644 (defun wnn-dict-name (dict-number dict-list)
|
|
1645 (let* ((dict-info (assoc dict-number dict-list))
|
|
1646 (dict-comment (nth 2 dict-info)))
|
|
1647 (if (string= dict-comment "")
|
|
1648 (file-name-nondirectory (nth 1 dict-info))
|
|
1649 dict-comment)))
|
|
1650
|
|
1651 (defun egg:toroku-word (yomi kanji interactive)
|
|
1652 (let*((dic-list (wnn-server-dict-list))
|
|
1653 (writable-dic-list (wnn-server-hinsi-dicts -1))
|
|
1654 (dict-number
|
|
1655 (menu:select-from-menu
|
|
1656 (list 'menu (egg:msg-get 'touroku-jishomei)
|
|
1657 (mapcar '(lambda (x)
|
|
1658 (let ((y (car (assoc x dic-list))))
|
|
1659 (cons (wnn-dict-name y dic-list) y)))
|
|
1660 writable-dic-list))))
|
|
1661 (hinsi-name (hinsi-from-menu dict-number "/"))
|
|
1662 (hinsi-no (wnn-server-hinsi-number hinsi-name))
|
|
1663 (dict-name (wnn-dict-name dict-number dic-list)))
|
|
1664 (if (or (not interactive)
|
|
1665 (notify-yes-or-no-p (egg:msg-get 'register-notify)
|
|
1666 kanji yomi hinsi-name dict-name))
|
|
1667 (if (wnn-server-word-add dict-number kanji yomi "" hinsi-no)
|
|
1668 (notify (egg:msg-get 'registerd) kanji yomi hinsi-name dict-name)
|
|
1669 (egg:error (wnn-server-get-msg))))))
|
|
1670
|
|
1671 (defun toroku-region (start end)
|
|
1672 (interactive "r")
|
|
1673 (if (null (wnn-server-isconnect)) (EGG:open-wnn))
|
|
1674 (wnn-server-set-rev nil)
|
|
1675 (let*((kanji
|
|
1676 (remove-regexp-in-string "[\0-\37]" (buffer-substring start end)))
|
|
1677 (yomi (read-current-its-string
|
|
1678 (format (egg:msg-get 'jishotouroku-yomi) kanji))))
|
|
1679 (egg:toroku-word yomi kanji nil)))
|
|
1680
|
|
1681 (defun delete-space (string)
|
|
1682 (let ((len (length string)))
|
|
1683 (if (eq len 0) ""
|
|
1684 (if (or (char-equal (aref string 0) ? ) (char-equal (aref string 0) ?-))
|
|
1685 (delete-space (substring string 1))
|
|
1686 (concat (substring string 0 1) (delete-space (substring string 1)))))))
|
|
1687
|
|
1688
|
|
1689 (defun toroku-henkan-mode ()
|
|
1690 (interactive)
|
|
1691 (let*((kanji
|
|
1692 (read-current-its-string (egg:msg-get 'kanji)
|
|
1693 (delete-space
|
|
1694 (buffer-substring (point) egg:*region-end* ))))
|
|
1695 (yomi (read-current-its-string
|
|
1696 (format (egg:msg-get 'jishotouroku-yomi) kanji)
|
|
1697 (let ((str "")
|
|
1698 (i *bunsetu-number*)
|
|
1699 (max (wnn-server-bunsetu-suu)))
|
|
1700 (while (< i max)
|
|
1701 (setq str (concat str (car (wnn-server-bunsetu-yomi i)) ))
|
|
1702 (setq i (1+ i)))
|
|
1703 str))))
|
|
1704 (egg:toroku-word yomi kanji nil)))
|
|
1705
|
|
1706 ;;;
|
|
1707 ;;; $B<-=qJT=87O(B DicEd
|
|
1708 ;;;
|
|
1709
|
|
1710 (defvar *diced-window-configuration* nil)
|
|
1711
|
|
1712 (defvar *diced-dict-info* nil)
|
|
1713
|
|
1714 (defvar *diced-yomi* nil)
|
|
1715
|
|
1716 ;;;;;
|
|
1717 ;;;;; User entry : edit-dict-item
|
|
1718 ;;;;;
|
|
1719
|
|
1720 (defun edit-dict-item (yomi)
|
|
1721 (interactive (list (read-current-its-string (egg:msg-get 'yomi))))
|
|
1722 (if (null (wnn-server-isconnect)) (EGG:open-wnn))
|
|
1723 (wnn-server-set-rev nil)
|
|
1724 (let ((dict-info (wnn-server-word-search yomi))
|
|
1725 (current-wnn-server-type))
|
|
1726 (if (null dict-info)
|
|
1727 (message (egg:msg-get 'no-yomi) yomi)
|
|
1728 (progn
|
|
1729 (setq current-wnn-server-type wnn-server-type)
|
|
1730 (setq *diced-yomi* yomi)
|
|
1731 (setq *diced-window-configuration* (current-window-configuration))
|
|
1732 (pop-to-buffer "*Nihongo Dictionary Information*")
|
|
1733 (setq wnn-server-type current-wnn-server-type)
|
|
1734 (setq major-mode 'diced-mode)
|
|
1735 (setq mode-name "Diced")
|
|
1736 (setq mode-line-buffer-identification
|
|
1737 (concat "DictEd: " yomi
|
|
1738 (make-string (max 0 (- 17 (string-width yomi))) ? )))
|
|
1739 (sit-for 0) ;; will redislay.
|
|
1740 ;;;(use-global-map diced-mode-map)
|
|
1741 (use-local-map diced-mode-map)
|
|
1742 (diced-display dict-info)
|
|
1743 ))))
|
|
1744
|
|
1745 (defun diced-redisplay ()
|
|
1746 (wnn-server-set-rev nil)
|
|
1747 (let ((dict-info (wnn-server-word-search *diced-yomi*)))
|
|
1748 (if (null dict-info)
|
|
1749 (progn
|
|
1750 (message (egg:msg-get 'no-yomi) *diced-yomi*)
|
|
1751 (diced-quit))
|
|
1752 (diced-display dict-info))))
|
|
1753
|
|
1754 (defun diced-display (dict-info)
|
|
1755 ;;; (values (list (record kanji bunpo hindo dict-number serial-number)))
|
|
1756 ;;; 0 1 2 3 4
|
|
1757 (setq dict-info
|
|
1758 (sort dict-info
|
|
1759 (function (lambda (x y)
|
|
1760 (or (< (nth 1 x) (nth 1 y))
|
|
1761 (if (= (nth 1 x) (nth 1 y))
|
|
1762 (or (> (nth 2 x) (nth 2 y))
|
|
1763 (if (= (nth 2 x) (nth 2 y))
|
|
1764 (< (nth 3 x) (nth 3 y))))))))))
|
|
1765 (setq *diced-dict-info* dict-info)
|
|
1766 (setq buffer-read-only nil)
|
|
1767 (erase-buffer)
|
|
1768 (let ((l-kanji
|
|
1769 (apply 'max
|
|
1770 (mapcar (function (lambda (l) (string-width (nth 0 l))))
|
|
1771 dict-info)))
|
|
1772 (l-bunpo
|
|
1773 (apply 'max
|
|
1774 (mapcar (function(lambda (l)
|
|
1775 (string-width (wnn-server-hinsi-name (nth 1 l)))))
|
|
1776 dict-info)))
|
|
1777 (dict-list (wnn-server-dict-list))
|
|
1778 (writable-dict-list (wnn-server-hinsi-dicts -1)))
|
|
1779 (while dict-info
|
|
1780 (let*((kanji (nth 0 (car dict-info)))
|
|
1781 (bunpo (nth 1 (car dict-info)))
|
|
1782 (hinshi (wnn-server-hinsi-name bunpo))
|
|
1783 (hindo (nth 2 (car dict-info)))
|
|
1784 (dict-number (nth 3 (car dict-info)))
|
|
1785 (dict-name (wnn-dict-name dict-number dict-list))
|
|
1786 (sys-dict-p (null (memq dict-number writable-dict-list)))
|
|
1787 (serial-number (nth 4 (car dict-info))))
|
|
1788 (insert (if sys-dict-p " *" " "))
|
|
1789 (insert kanji)
|
|
1790 (insert-char ?
|
|
1791 (- (+ l-kanji 10) (string-width kanji)))
|
|
1792 (insert hinshi)
|
|
1793 (insert-char ? (- (+ l-bunpo 2) (string-width hinshi)))
|
|
1794 (insert (egg:msg-get 'jisho) (file-name-nondirectory dict-name)
|
|
1795 "/" (int-to-string serial-number)
|
|
1796 (egg:msg-get 'hindo) (int-to-string hindo) ?\n )
|
|
1797 (setq dict-info (cdr dict-info))))
|
|
1798 (goto-char (point-min)))
|
|
1799 (setq buffer-read-only t))
|
|
1800
|
|
1801 (defun diced-add ()
|
|
1802 (interactive)
|
|
1803 (diced-execute t)
|
|
1804 (let*((kanji (read-from-minibuffer (egg:msg-get 'kanji))))
|
|
1805 (egg:toroku-word *diced-yomi* kanji t)
|
|
1806 (diced-redisplay)))
|
|
1807
|
|
1808 (defun diced-delete ()
|
|
1809 (interactive)
|
|
1810 (beginning-of-line)
|
|
1811 (if (= (char-after (1+ (point))) ?* )
|
|
1812 (progn (message (egg:msg-get 'cannot-remove)) (beep))
|
|
1813 (if (= (following-char) ? )
|
|
1814 (let ((buffer-read-only nil))
|
|
1815 (delete-char 1) (insert "D") (backward-char 1))
|
|
1816 )))
|
|
1817
|
|
1818
|
|
1819 (defun diced-undelete ()
|
|
1820 (interactive)
|
|
1821 (beginning-of-line)
|
|
1822 (if (= (following-char) ?D)
|
|
1823 (let ((buffer-read-only nil))
|
|
1824 (delete-char 1) (insert " ") (backward-char 1))
|
|
1825 (beep)))
|
|
1826
|
|
1827 (defun diced-redisplay-hindo (dict-number serial-number)
|
|
1828 (let ((hindo))
|
|
1829 (setq buffer-read-only nil)
|
|
1830 (beginning-of-line)
|
|
1831 (re-search-forward "\\([0-9\-]+\\)\\(\n\\)")
|
|
1832 (delete-region (match-beginning 1) (match-end 1))
|
|
1833 (setq hindo (nth 3 (wnn-server-word-info dict-number serial-number)))
|
|
1834 (goto-char (match-beginning 1))
|
|
1835 (insert (int-to-string hindo))
|
|
1836 (beginning-of-line)
|
|
1837 (setq buffer-read-only t)))
|
|
1838
|
|
1839 (defun diced-use ()
|
|
1840 (interactive)
|
|
1841 (let* ((dict-item (nth
|
|
1842 (+ (count-lines (point-min) (point))
|
|
1843 (if (= (current-column) 0) 1 0)
|
|
1844 -1)
|
|
1845 *diced-dict-info*))
|
114
|
1846 ; (hindo (nth 2 dict-item))
|
70
|
1847 (dict-number (nth 3 dict-item))
|
|
1848 (serial-number (nth 4 dict-item))
|
|
1849 )
|
|
1850 (if (null (wnn-server-word-use dict-number serial-number))
|
|
1851 (egg:error (wnn-server-get-msg)))
|
|
1852 (diced-redisplay-hindo dict-number serial-number)))
|
|
1853
|
|
1854 (defun diced-hindo-set (&optional newhindo)
|
|
1855 (interactive)
|
|
1856 (if (null newhindo)
|
114
|
1857 (setq newhindo (read-expression (egg:msg-get 'enter-hindo))))
|
70
|
1858 (let* ((dict-item (nth
|
|
1859 (+ (count-lines (point-min) (point))
|
|
1860 (if (= (current-column) 0) 1 0)
|
|
1861 -1)
|
|
1862 *diced-dict-info*))
|
114
|
1863 ; (hindo (nth 2 dict-item))
|
70
|
1864 (dict-number (nth 3 dict-item))
|
|
1865 (serial-number (nth 4 dict-item))
|
|
1866 )
|
|
1867 (if (null (wnn-server-word-hindo-set dict-number serial-number newhindo))
|
|
1868 (egg:error (wnn-server-get-msg)))
|
|
1869 (diced-redisplay-hindo dict-number serial-number)))
|
|
1870
|
|
1871 (defun diced-quit ()
|
|
1872 (interactive)
|
|
1873 (setq buffer-read-only nil)
|
|
1874 (erase-buffer)
|
|
1875 (setq buffer-read-only t)
|
|
1876 (bury-buffer (get-buffer "*Nihongo Dictionary Information*"))
|
|
1877 (set-window-configuration *diced-window-configuration*)
|
|
1878 )
|
|
1879
|
|
1880 (defun diced-execute (&optional display)
|
|
1881 (interactive)
|
|
1882 (goto-char (point-min))
|
|
1883 (let ((no 0))
|
|
1884 (while (not (eobp))
|
|
1885 (if (= (following-char) ?D)
|
|
1886 (let* ((dict-item (nth no *diced-dict-info*))
|
|
1887 (kanji (nth 0 dict-item))
|
|
1888 (bunpo (nth 1 dict-item))
|
|
1889 (hinshi (wnn-server-hinsi-name bunpo))
|
114
|
1890 ; (hindo (nth 2 dict-item))
|
70
|
1891 (dict-number (nth 3 dict-item))
|
|
1892 (dict-name (wnn-dict-name dict-number (wnn-server-dict-list)))
|
114
|
1893 ; (sys-dict-p (null (memq dict-number (wnn-server-hinsi-dicts -1))))
|
70
|
1894 (serial-number (nth 4 dict-item))
|
|
1895 )
|
|
1896 (if (notify-yes-or-no-p (egg:msg-get 'remove-notify)
|
|
1897 kanji hinshi dict-name)
|
|
1898 (progn
|
|
1899 (if (wnn-server-word-delete dict-number serial-number)
|
|
1900 (notify (egg:msg-get 'removed)
|
|
1901 kanji hinshi dict-name)
|
|
1902 (egg:error (wnn-server-get-msg)))
|
|
1903 ))))
|
|
1904 (setq no (1+ no))
|
|
1905 (forward-line 1)))
|
|
1906 (forward-line -1)
|
|
1907 (if (not display) (diced-redisplay)))
|
|
1908
|
|
1909 (defun diced-next-line ()
|
|
1910 (interactive)
|
|
1911 (beginning-of-line)
|
|
1912 (forward-line 1)
|
|
1913 (if (eobp) (progn (beep) (forward-line -1))))
|
|
1914
|
|
1915 (defun diced-end-of-buffer ()
|
|
1916 (interactive)
|
|
1917 (goto-char (point-max))
|
|
1918 (forward-line -1))
|
|
1919
|
|
1920 (defun diced-scroll-down ()
|
|
1921 (interactive)
|
|
1922 (scroll-down)
|
|
1923 (if (eobp) (forward-line -1)))
|
|
1924
|
|
1925 (defun diced-mode ()
|
114
|
1926 "Mode for \"editing\" Wnn dictionaries.
|
70
|
1927 In diced, you are \"editing\" a list of the entries in dictionaries.
|
|
1928 You can move using the usual cursor motion commands.
|
|
1929 Letters no longer insert themselves. Instead,
|
|
1930
|
|
1931 Type a to Add new entry.
|
|
1932 Type d to flag an entry for Deletion.
|
|
1933 Type n to move cursor to Next entry.
|
|
1934 Type p to move cursor to Previous entry.
|
|
1935 Type q to Quit from DicEd.
|
|
1936 Type C-u to Toggle the word to use/unuse.
|
|
1937 Type u to Unflag an entry (remove its D flag).
|
|
1938 Type x to eXecute the deletions requested.
|
|
1939 "
|
|
1940 )
|
|
1941
|
|
1942 (defvar diced-mode-map (let ((map (make-sparse-keymap))) (suppress-keymap map) map))
|
|
1943
|
|
1944 (define-key diced-mode-map "a" 'diced-add)
|
|
1945 (define-key diced-mode-map "d" 'diced-delete)
|
|
1946 (define-key diced-mode-map "n" 'diced-next-line)
|
|
1947 (define-key diced-mode-map "p" 'previous-line)
|
|
1948 (define-key diced-mode-map "q" 'diced-quit)
|
|
1949 ;(define-key diced-mode-map "t" 'diced-use)
|
|
1950 (define-key diced-mode-map "u" 'diced-undelete)
|
|
1951 (define-key diced-mode-map "x" 'diced-execute)
|
|
1952
|
|
1953 (define-key diced-mode-map "\C-h" 'help-command)
|
|
1954 (define-key diced-mode-map "\C-n" 'diced-next-line)
|
|
1955 (define-key diced-mode-map "\C-p" 'previous-line)
|
|
1956 (define-key diced-mode-map "\C-u" 'diced-use)
|
|
1957 (define-key diced-mode-map "\C-v" 'scroll-up)
|
|
1958 (define-key diced-mode-map "\eh" 'diced-hindo-set)
|
|
1959 (define-key diced-mode-map "\e<" 'beginning-of-buffer)
|
|
1960 (define-key diced-mode-map "\e>" 'diced-end-of-buffer)
|
|
1961 (define-key diced-mode-map "\ev" 'diced-scroll-down)
|
|
1962
|
|
1963 (define-key diced-mode-map [up] 'previous-line)
|
|
1964 (define-key diced-mode-map [down] 'diced-next-line)
|
|
1965
|
|
1966
|
|
1967 ;;;
|
|
1968 ;;; set comment on dictionary
|
|
1969 ;;;
|
|
1970
|
|
1971 (defun set-dict-comment ()
|
|
1972 (interactive)
|
|
1973 (if (null (wnn-server-isconnect)) (EGG:open-wnn))
|
|
1974 (wnn-server-set-rev nil)
|
|
1975 (let*((dic-list (wnn-server-dict-list))
|
|
1976 (writable-dic-list (wnn-server-hinsi-dicts -1))
|
|
1977 (dict-number
|
|
1978 (menu:select-from-menu
|
|
1979 (list 'menu (egg:msg-get 'jishomei)
|
|
1980 (mapcar '(lambda (x)
|
|
1981 (let ((y (assoc x dic-list)))
|
|
1982 (cons (nth 1 y) (nth 0 y))))
|
|
1983 writable-dic-list))))
|
|
1984 (comment (read-from-minibuffer (egg:msg-get 'comment)
|
|
1985 (wnn-dict-name dict-number dic-list))))
|
|
1986 (if (wnn-server-dict-comment dict-number comment)
|
|
1987 (notify (egg:msg-get 'jisho-comment)
|
|
1988 (wnn-dict-name dict-number dic-list) comment)
|
|
1989 (egg:error (wnn-server-get-msg)))))
|
|
1990
|
|
1991
|
|
1992 ;;;
|
|
1993 ;;; Pure inspect facility
|
|
1994 ;;;
|
|
1995
|
|
1996 (defun henkan-inspect-bunsetu ()
|
|
1997 (interactive)
|
|
1998 (let ((info (wnn-server-inspect *bunsetu-number*)))
|
|
1999 (if (null info)
|
|
2000 (notify (wnn-server-get-msg))
|
|
2001 (progn
|
|
2002 (let ((dic-list (wnn-server-dict-list)))
|
|
2003 (if (null dic-list)
|
|
2004 (notify (wnn-server-get-msg))
|
|
2005 (progn
|
|
2006 (let ((hinsi (wnn-server-hinsi-name (nth 4 info)))
|
|
2007 (kanji (nth 0 info))
|
|
2008 (yomi (nth 1 info))
|
|
2009 (serial (nth 3 info))
|
|
2010 (hindo (nth 5 info))
|
|
2011 (jisho (wnn-dict-name (nth 2 info) dic-list))
|
|
2012 (ima (nth 6 info))
|
|
2013 (hyoka (nth 7 info))
|
|
2014 (daihyoka (nth 8 info))
|
|
2015 (kangovect (nth 9 info)))
|
|
2016 (notify-internal
|
|
2017 (format "%s %s(%s %s:%s Freq:%s%s) S:%s D:%s V:%s "
|
|
2018 kanji yomi hinsi jisho serial
|
|
2019 (if (= ima 1) "*" " ")
|
|
2020 hindo hyoka daihyoka kangovect)
|
|
2021 t)))))))))
|
|
2022
|
114
|
2023 (provide 'egg-wnn)
|
70
|
2024
|
114
|
2025 ;;; egg-wnn.el ends here
|