[uim-commit] r2205 - trunk/scm

ekato at freedesktop.org ekato at freedesktop.org
Mon Nov 21 10:21:12 PST 2005


Author: ekato
Date: 2005-11-21 10:20:57 -0800 (Mon, 21 Nov 2005)
New Revision: 2205

Modified:
   trunk/scm/skk.scm
Log:
* scm/skk.scm (skk-commit-with-conv-completion) : Disable
  completion if there is no dcomp-word.  See [Anthy-dev: 2643,
  2646].
(skk-proc-state-kanji) : Disable completion in
  skk-begin-conv-with-completion-key if dcomp-word is not
  available.  This behavior is different from ddskk's.
(skk-proc-state-completion) : Reset dcomp-word before going back
  to kanji-state.


Modified: trunk/scm/skk.scm
===================================================================
--- trunk/scm/skk.scm	2005-11-21 16:26:46 UTC (rev 2204)
+++ trunk/scm/skk.scm	2005-11-21 18:20:57 UTC (rev 2205)
@@ -1199,16 +1199,30 @@
 	(begin
 	  (skk-append-residual-kana sc)
 	  (if (not (null? (skk-context-head sc)))
-	      (let ((dcomp (skk-lib-get-dcomp-word
-			    (skk-make-string
-			     (skk-context-head sc)
-			     (skk-context-kana-mode sc)))))
-		(if (not (string=? dcomp ""))
+	      ; disabled completion --ekato. see [Anthy-dev: 2646]
+	      ;(let ((dcomp (skk-lib-get-dcomp-word
+	      ;		    (skk-make-string
+	      ;		     (skk-context-head sc)
+	      ;		     (skk-context-kana-mode sc)))))
+	      ;	(if (not (string=? dcomp ""))
+	      ;	    (begin
+	      ;	      (skk-context-set-head! sc '())
+	      ;	      (skk-string-list-to-context-head
+	      ;	       sc
+	      ;	       (string-to-list dcomp))
+	      ;	      (if (skk-lib-get-entry
+	      ;	      		 (skk-make-string
+	      ;			  (skk-context-head sc) skk-type-hiragana)
+	      ;			  ""
+	      ;			  ""
+	      ;			  skk-use-numeric-conversion?)
+	      ;		  (begin
+	      ;		    (skk-context-set-nth! sc 0)
+	      ;		    (skk-commit sc (skk-prepare-commit-string sc)))
+	      ;		  (begin
+	      ;		    (skk-commit sc dcomp)
+	      ;		    (skk-flush sc))))
 		    (begin
-		      (skk-context-set-head! sc '())
-		      (skk-string-list-to-context-head
-		       sc
-		       (string-to-list dcomp))
 		      (if (skk-lib-get-entry
 		      		 (skk-make-string
 				  (skk-context-head sc) skk-type-hiragana)
@@ -1219,23 +1233,10 @@
 			    (skk-context-set-nth! sc 0)
 			    (skk-commit sc (skk-prepare-commit-string sc)))
 			  (begin
-			    (skk-commit sc dcomp)
-			    (skk-flush sc))))
-		    (begin
-		      (if (skk-lib-get-entry
-		      		 (skk-make-string
-				  (skk-context-head sc) skk-type-hiragana)
-				  ""
-				  ""
-				  skk-use-numeric-conversion?)
-			  (begin
-			    (skk-context-set-nth! sc 0)
-			    (skk-commit sc (skk-prepare-commit-string sc)))
-			  (begin
 			    (skk-commit sc (skk-make-string
 			    		    (skk-context-head sc)
 					    (skk-context-kana-mode sc)))
-			    (skk-flush sc))))))
+			    (skk-flush sc))));))  --ekato
 	      (skk-flush sc))))))
 
 (define skk-proc-state-kanji
@@ -1316,21 +1317,22 @@
 		   (skk-begin-conversion sc))
 		 (begin
 		   (skk-append-residual-kana sc)
-		   (let ((sl (string-to-list
-		 	    (skk-lib-get-dcomp-word
-			     (skk-make-string
-			      (skk-context-head sc)
-			      (skk-context-kana-mode sc))
-			     skk-use-numeric-conversion?))))
-		     (if (not (null? sl))
-			 (begin
-			   (skk-context-set-head! sc '())
-			   (skk-string-list-to-context-head sc sl)
-			   (skk-begin-conversion sc))
-			 (begin
+		   ; do uim's own way --ekato. see [Anthy-dev: 2646]
+		   ;(let ((sl (string-to-list
+		   ;	    (skk-lib-get-dcomp-word
+		   ;	     (skk-make-string
+		   ;	      (skk-context-head sc)
+		   ;	      (skk-context-kana-mode sc))
+		   ;	     skk-use-numeric-conversion?))))
+		   ;  (if (not (null? sl))
+		   ;	 (begin
+		   ;	   (skk-context-set-head! sc '())
+		   ;	   (skk-string-list-to-context-head sc sl)
+		   ;	   (skk-begin-conversion sc))
+		   ;	 (begin
 			   (if (not (null? (skk-context-head sc)))
 			       (skk-begin-conversion sc)
-			       (skk-flush sc)))))))
+			       (skk-flush sc))));))) --ekato
 	     #f)
 	   #t)
        (if (skk-commit-with-conv-completion-key? key key-state)
@@ -1815,6 +1817,8 @@
 	     (begin
 	       (skk-context-set-head! sc '())
 	       (skk-string-list-to-context-head sc sl)))
+	 (if skk-dcomp-activate?
+	     (skk-context-set-dcomp-word! sc ""))
 	 (skk-context-set-state! sc 'skk-state-kanji)
 	 (skk-proc-state-kanji c key key-state)))
       #f)))



More information about the uim-commit mailing list