Revision: 6318
Author: ek.kato
Date: Sun Apr 11 05:29:09 2010
Log: * scm/predict-look-skk.scm (predict-look-skk search)
* scm/predict-look.scm (predict-look search)
- Don't crash when a dictionary file is not found.
http://code.google.com/p/uim/source/detail?r=6318
Modified:
/trunk/scm/predict-look-skk.scm
/trunk/scm/predict-look.scm
=======================================
--- /trunk/scm/predict-look-skk.scm Sun Apr 4 20:35:54 2010
+++ /trunk/scm/predict-look-skk.scm Sun Apr 11 05:29:09 2010
@@ -42,12 +42,15 @@
(class-set-method! predict-look-skk search
(lambda (self str)
- (let* ((ret (map (lambda (x)
+ (let* ((looked (look-lib-look #f #f
+ (predict-look-skk-limit self)
+ (predict-look-skk-jisyo self)
+ str))
+ (ret (map (lambda (x)
(string-split x " "))
- (look-lib-look #f #f
- (predict-look-skk-limit self)
- (predict-look-skk-jisyo self)
- str)))
+ (if looked
+ looked
+ '())))
(yomi/kanji/appendix
(apply append
(map (lambda (x)
=======================================
--- /trunk/scm/predict-look.scm Sun Apr 4 20:35:54 2010
+++ /trunk/scm/predict-look.scm Sun Apr 11 05:29:09 2010
@@ -42,12 +42,15 @@
(class-set-method! predict-look search
(lambda (self str)
- (let ((ret (map-in-order
+ (let* ((looked (look-lib-look #t #t
+ (predict-look-limit self)
+ (predict-look-dictionary-filename self)
str))
+ (ret (map-in-order
(lambda (ret)
(string-append str ret))
- (look-lib-look #t #t
- (predict-look-limit self)
- (predict-look-dictionary-filename self)
str))))
+ (if looked
+ looked
+ '()))))
(make-predict-result
ret
ret
--
To unsubscribe, reply using "remove me" as the subject.