Author: deton.kih
Date: Mon Jan 14 00:51:32 2008
New Revision: 5125

Modified:
  trunk/scm/tutcode-custom.scm
  trunk/scm/tutcode.scm

Log:
* scm/tutcode-custom.scm
 - (custom tutcode-enable-mazegaki-learning?): New custom variable
* scm/tutcode.scm
 - (tutcode-save-personal-dictionary):
Change not to save dictionary if tutcode-enable-mazegaki-learning? is #f.
 - (tutcode-prepare-commit-string): Change not to learn(reorder candidates)
   if tutcode-enable-mazegaki-learning? is #f
   (to select candidate by fixed label key on mazegaki conversion).


Modified: trunk/scm/tutcode-custom.scm
==============================================================================
--- trunk/scm/tutcode-custom.scm        (original)
+++ trunk/scm/tutcode-custom.scm        Mon Jan 14 00:51:32 2008
@@ -68,6 +68,12 @@
  (N_ "Code table file")
  (N_ "Code table name is 'filename-rule' when code table file name is 
'filename.scm'."))

+(define-custom 'tutcode-enable-mazegaki-learning? #t
+  '(tutcode)
+  '(boolean)
+  (N_ "Enable learning in mazegaki conversion")
+  (N_ "long description will be here."))
+
(define-custom 'tutcode-use-with-vi? #f
  '(tutcode)
  '(boolean)

Modified: trunk/scm/tutcode.scm
==============================================================================
--- trunk/scm/tutcode.scm       (original)
+++ trunk/scm/tutcode.scm       Mon Jan 14 00:51:32 2008
@@ -50,6 +50,8 @@
;;;   ���Τ��ᡢ�ؽ���ǽ��SKK��Ʊ�ͤ�ư��ˤʤ�ޤ�:
;;;     ���ꤷ������ϼ�����Ѵ�������Ƭ����ޤ���
;;;     ���ꤷ������ϸĿͼ���(~/.mazegaki.dic)����¸����ޤ���
+;;;   �����γؽ���ǽ�򥪥դˤ���ˤϡ�
+;;;   tutcode-enable-mazegaki-learning?�ѿ��#f�����ꤷ�Ƥ��������
;;;
;;; * ���Ѥ������Ѵ��ϼ�ưŪ�ˤϹԤ��ޤ���
;;;   �ɤߤ����Ū��"��"���ղä����Ѵ����Ƥ��������
@@ -254,7 +256,9 @@

;;; �򤼽��Ѵ��ѸĿͼ����񤭹��ࡣ
(define (tutcode-save-personal-dictionary)
-  (if (not (setugid?))
+  (if (and
+        tutcode-enable-mazegaki-learning?
+        (not (setugid?)))
      (skk-lib-save-personal-dictionary tutcode-personal-dic-filename)))

;;; �������ȥ�������ʸ��ؤ��Ѵ��Τ����rk-push-key!��ƤӽФ���
@@ -308,12 +312,17 @@
;;; @param pc ����ƥ����ȥꥹ��
(define (tutcode-prepare-commit-string pc)
  (let* ((res (tutcode-get-current-candidate pc)))
-    ;; skk-lib-commit-candidate��Ƥ֤ȳؽ���Ԥ���
-    (skk-lib-commit-candidate
-      (tutcode-make-string (tutcode-context-head pc)) "" ""
-        (tutcode-context-nth pc) #f)
-    (if (> (tutcode-context-nth pc) 0)
-      (tutcode-save-personal-dictionary))
+    ;; ���Ĥ�����Υ�٥륭��������θ������ꤹ��Ȥ���Ǥ���褦�ˡ�
+    ;; tutcode-enable-mazegaki-learning?��#f�ξ��ϸ�����¤ӽ���Ѥ��ʤ���
+    ;; (��:�֤����פ��Ѵ��ˤ����ơ����d�����ǡֲ�ס�e�����ǡֲ�פ����)
+    (if tutcode-enable-mazegaki-learning?
+      (begin
+        ;; skk-lib-commit-candidate��Ƥ֤ȳؽ����Ԥ�졢����礬�ѹ������
+        (skk-lib-commit-candidate
+          (tutcode-make-string (tutcode-context-head pc)) "" ""
+          (tutcode-context-nth pc) #f)
+        (if (> (tutcode-context-nth pc) 0)
+          (tutcode-save-personal-dictionary))))
    (tutcode-flush pc)
    res))

Reply via email to