[uim-commit] r2138 - trunk/scm

ekato at freedesktop.org ekato at freedesktop.org
Mon Nov 14 05:49:19 PST 2005


Author: ekato
Date: 2005-11-14 05:49:16 -0800 (Mon, 14 Nov 2005)
New Revision: 2138

Modified:
   trunk/scm/skk-key-custom.scm
   trunk/scm/skk.scm
Log:
* scm/skk.scm (skk-proc-state-kanji) : Handle
  skk-begin-conv-with-completion-key.
* scm/skk-key-custom.scm (skk-begin-conv-with-completion-key) :
  New custom key setting.


Modified: trunk/scm/skk-key-custom.scm
===================================================================
--- trunk/scm/skk-key-custom.scm	2005-11-14 13:46:17 UTC (rev 2137)
+++ trunk/scm/skk-key-custom.scm	2005-11-14 13:49:16 UTC (rev 2138)
@@ -172,6 +172,13 @@
 	       (_ "[SKK] previous completion candidate")
 	       (_ "long description will be here"))
 
+(define-custom 'skk-begin-conv-with-completion-key '("<Alt> ")
+	       '(skk-keys2 skk-keys-completion)
+	       '(key)
+	       (_ "[SKK] begin conversion with completion")
+	       (_ "long description will be here"))
+
+
 (define-custom 'skk-special-midashi-key '("<IgnoreShift>>" "<IgnoreShift><" "<IgnoreShift>?")
                '(skk-keys2)
 	       '(key)

Modified: trunk/scm/skk.scm
===================================================================
--- trunk/scm/skk.scm	2005-11-14 13:46:17 UTC (rev 2137)
+++ trunk/scm/skk.scm	2005-11-14 13:49:16 UTC (rev 2138)
@@ -1275,6 +1275,34 @@
 			   (skk-proc-state-direct c key key-state)))))
  	     #f)
 	   #t)
+       (if (skk-begin-conv-with-completion-key? key key-state)
+	   (begin
+	     (if (and
+		  skk-dcomp-activate?
+		  (not (skk-rk-pending? sc))
+		  (not (string=? (skk-context-dcomp-word sc) "")))
+		 (let ((sl (string-to-list (skk-context-dcomp-word sc))))
+		    (skk-context-set-head! sc '())
+		    (skk-string-list-to-context-head sc sl)
+		    (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))))))
+		     (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)))))))
+	     #f)
+	   #t)
        ;; Then check latin-conv status before key handling of hiragana/katakana
        (if (skk-context-latin-conv sc)
 	   (begin



More information about the uim-commit mailing list