Revision: 6809
Author: deton.kih
Date: Wed Nov 10 03:30:19 2010
Log: * Add function to redisplay last auto-help window.
* scm/tutcode.scm
  - Update comments.
  - (tutcode-context-rec-spec): Add auto-help variable.
  - (tutcode-check-stroke-help-window-begin): Add auto-help-redisplay label.
  - (tutcode-check-auto-help-window-begin):
    Change to use variable auto-help instead of stroke-help
    to hold auto-help contents.
  - (tutcode-auto-help-redisplay): New function.
  - (tutcode-proc-state-on):
    Add check of tutcode-auto-help-redisplay stroke.
  - (tutcode-proc-state-yomi): Ditto.
  - (tutcode-proc-state-bushu): Ditto.
  - (tutcode-get-candidate-handler):
    Split auto-help from stroke-help.
  - (tutcode-custom-set-mazegaki/bushu-start-sequence!):
    Add auto-help-redisplay-sequence.
* scm/tutcode-key-custom.scm
  - (tutcode-auto-help-redisplay-sequence): New custom.

http://code.google.com/p/uim/source/detail?r=6809

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

=======================================
--- /trunk/scm/tutcode-key-custom.scm   Fri Nov  5 20:11:05 2010
+++ /trunk/scm/tutcode-key-custom.scm   Wed Nov 10 03:30:19 2010
@@ -83,6 +83,12 @@
               (N_ "[TUT-Code] latin conversion mode")
               (N_ "long description will be here"))

+(define-custom 'tutcode-auto-help-redisplay-sequence ""
+               '(tutcode-keys1)
+              '(string ".*")
+              (N_ "[TUT-Code] display last auto help")
+              (N_ "long description will be here"))
+
 (define-custom 'tutcode-stroke-help-toggle-key '("<Control>/")
                '(tutcode-keys1)
                '(key)
=======================================
--- /trunk/scm/tutcode.scm      Tue Nov  9 03:46:36 2010
+++ /trunk/scm/tutcode.scm      Wed Nov 10 03:30:19 2010
@@ -71,22 +71,32 @@
 ;;;   ¸ò¤¼½ñ¤­ÊÑ´¹¤äÉô¼ó¹çÀ®ÊÑ´¹¤ÇÆþÎϤ·¤¿Ê¸»ú¤ÎÂǤÁÊý¤òɽ¼¨¤·¤Þ¤¹¡£
 ;;;   Éô¼ó¹çÀ®ÊýË¡¤â¡¢´Êñ¤Ê¹çÀ®¤Ë´Ø¤·¤Æ¤Ïɽ¼¨²Äǽ¤Ç¤¹¡£
 ;;;   Îã:¸ò¤¼½ñ¤­ÊÑ´¹¤Ç¡Öͫݵ¡×¤ò³ÎÄꤷ¤¿¾ì¹ç
-;;;    ¨£¨¡¨¨¨¡¨¨¨¡¨¨¨¡¨¨¨¡¨¨¨¡¨¨¨¡¨¡¨¡¨¡¨¡¨¨¨¡¨¨¨¡¨¨¨¡¨¨¨¡¨¤
-;;;    ¨¢  ¨¢  ¨¢  ¨¢  ¨¢  ¨¢  ¨¢          ¨¢  ¨¢  ¨¢  ¨¢  ¨¢
-;;;    ¨§¨¡¨«¨¡¨«¨¡¨«¨¡¨«¨¡¨©  ¨§¨¡¨¡¨¡¨¡¨¡¨«¨¡¨«¨¡¨«¨¡¨«¨¡¨©
-;;;    ¨¢  ¨¢  ¨¢  ¨¢  ¨¢b ¨¢  ¨¢          ¨¢  ¨¢  ¨¢f ¨¢  ¨¢
-;;;    ¨§¨¡¨«¨¡¨«¨¡¨«¨¡¨«¨¡¨©  ¨§¨¡¨¡¨¡¨¡¨¡¨«¨¡¨«¨¡¨«¨¡¨«¨¡¨©
-;;;    ¨¢  ¨¢3 ¨¢  ¨¢  ¨¢  ¨¢  ¨¢          ¨¢  ¨¢  ¨¢1 ¨¢  ¨¢
-;;;    ¨§¨¡¨«¨¡¨«¨¡¨«¨¡¨«¨¡¨©  ¨§¨¡¨¡¨¡¨¡¨¡¨«¨¡¨«¨¡¨«¨¡¨«¨¡¨©
-;;;    ¨¢  ¨¢  ¨¢d ¨¢  ¨¢e ¨¢  ¨¢2a(¢¥ÎÓ´Ì)¨¢  ¨¢  ¨¢  ¨¢  ¨¢
-;;;    ¨¦¨¡¨ª¨¡¨ª¨¡¨ª¨¡¨ª¨¡¨ª¨¡¨ª¨¡¨¡¨¡¨¡¨¡¨ª¨¡¨ª¨¡¨ª¨¡¨ª¨¡¨¥
+;;;    ¨£¨¡¨¨¨¡¨¨¨¡¨¨¨¡¨¨¨¡¨¨¨¡¨¨¨¡¨¡¨¡¨¡¨¡¨¡¨¨¨¡¨¨¨¡¨¨¨¡¨¡¨¡¨¨¨¡¨¤
+;;;    ¨¢  ¨¢  ¨¢  ¨¢  ¨¢  ¨¢  ¨¢            ¨¢  ¨¢  ¨¢      ¨¢  ¨¢
+;;;    ¨§¨¡¨«¨¡¨«¨¡¨«¨¡¨«¨¡¨©  ¨§¨¡¨¡¨¡¨¡¨¡¨¡¨«¨¡¨«¨¡¨«¨¡¨¡¨¡¨«¨¡¨©
+;;;    ¨¢  ¨¢  ¨¢  ¨¢  ¨¢b ¨¢  ¨¢            ¨¢  ¨¢  ¨¢f     ¨¢  ¨¢
+;;;    ¨§¨¡¨«¨¡¨«¨¡¨«¨¡¨«¨¡¨©  ¨§¨¡¨¡¨¡¨¡¨¡¨¡¨«¨¡¨«¨¡¨«¨¡¨¡¨¡¨«¨¡¨©
+;;;    ¨¢  ¨¢3 ¨¢  ¨¢  ¨¢  ¨¢  ¨¢            ¨¢  ¨¢  ¨¢1(Í«) ¨¢  ¨¢
+;;;    ¨§¨¡¨«¨¡¨«¨¡¨«¨¡¨«¨¡¨©  ¨§¨¡¨¡¨¡¨¡¨¡¨¡¨«¨¡¨«¨¡¨«¨¡¨¡¨¡¨«¨¡¨©
+;;;    ¨¢  ¨¢  ¨¢d ¨¢  ¨¢e ¨¢  ¨¢2a(ݵ¢¥ÎÓ´Ì)¨¢  ¨¢  ¨¢      ¨¢  ¨¢
+;;;    ¨¦¨¡¨ª¨¡¨ª¨¡¨ª¨¡¨ª¨¡¨ª¨¡¨ª¨¡¨¡¨¡¨¡¨¡¨¡¨ª¨¡¨ª¨¡¨ª¨¡¨¡¨¡¨ª¨¡¨¥
+;;; ** ľ¶á¤Ëɽ¼¨¤·¤¿¼«Æ°¥Ø¥ë¥×¤ÎºÆÉ½¼¨
+;;;    tutcode-auto-help-redisplay-sequence¤Ë°Ê²¼¤Î¤è¤¦¤Ë¥­¡¼¥·¡¼¥±¥ó¥¹¤ò
+;;;    ÀßÄꤹ¤ë¤È»ÈÍѲÄǽ¤Ë¤Ê¤ê¤Þ¤¹¡£
+;;;      (define tutcode-auto-help-redisplay-sequence "al-")
 ;;;
 ;;; ¡ÚÊä´°/ͽ¬ÆþÎÏ¡¦½Ï¸ì¥¬¥¤¥É¡Û
 ;;; * Êä´°/ͽ¬ÆþÎÏ¡¦½Ï¸ì¥¬¥¤¥É¤È¤â¸õÊ䥦¥£¥ó¥É¥¦¤Ëɽ¼¨¤·¤Þ¤¹¡£
 ;;; * Êä´°/ͽ¬ÆþÎϵ¡Ç½¤ò»È¤¦¤Ë¤Ï¡¢
-;;;   uim-pref-gtkÅù¤Î¡ÖÊä½õͽ¬ÆþÎϡץ°¥ë¡¼¥×¤ÎÀßÄê¤Ç¡¢
-;;;   Look-SKK¤òÍ­¸ú¤Ë¤·¤Æmazegaki.dicÁêÅö¤Î¼­½ñ¤ò»ØÄꤹ¤ë¤«¡¢
-;;;   Look¤òÍ­¸ú¤Ë¤·¤ÆÃ±¸ì¥Õ¥¡¥¤¥ë¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
+;;;   uim-pref-gtkÅù¤Î¡ÖÊä½õͽ¬ÆþÎϡץ°¥ë¡¼¥×¤ÎÀßÄ꤬ɬÍפǤ¹¡£
+;;;     (a)Look-SKK¤òÍ­¸ú¤Ë¤·¤Æmazegaki.dicÁêÅö¤Î¼­½ñ¥Õ¥¡¥¤¥ë¤ò»ØÄꤹ¤ë¡£
+;;;        (¼ç¤Ëͽ¬ÆþÎÏÍÑ)
+;;;     (b)Look¤òÍ­¸ú¤Ë¤·¤ÆÃ±¸ì¥Õ¥¡¥¤¥ë¤ò»ØÄꤹ¤ë¡£(Êä´°ÍÑ)
+;;; mazegaki.dic¤ÎÆÉ¤ß¤Ë¡¢´Á»ú¤È¤·¤Æ¤ÏÆþ¤Ã¤Æ¤¤¤Ê¤¤Ã±¸ì¤òÊä´°¤·¤¿¤¤¾ì¹ç¡£
+;;;        (Îã:¡Ö¶¸ËۡסּÞÇ®¡×)
+;;;     (c)Sqlite3¤òÍ­¸ú¤Ë¤¹¤ë¡£
+;;;        Êä´°/ͽ¬ÆþÎϤÇÁªÂò¤·¤¿¸õÊä¤ò³Ø½¬¤·¤¿¤¤¾ì¹ç¡¢°ìÈÖ¾å¤ËÇÛÃÖ¡£
+;;;   Æóʬõº÷¤¹¤ë¤Î¤Ç¡¢(a)(b)¤Î¥Õ¥¡¥¤¥ë¤Ï¥½¡¼¥È¤·¤Æ¤ª¤¯É¬Íפ¬¤¢¤ê¤Þ¤¹¡£
 ;;; * Êä´°/ͽ¬ÆþÎϤγ«»Ï¤Ï°Ê²¼¤Î¤¤¤º¤ì¤«¤Î¥¿¥¤¥ß¥ó¥°:
 ;;; ** Êä´°: tutcode¥ª¥ó¤Î¾õÂÖ¤Çtutcode-completion-chars-min¤Îʸ»ú¿ôÆþÎÏ»þ
 ;;; ** Êä´°: tutcode¥ª¥ó¤Î¾õÂÖ¤Ç<Control>.ÂǸ°»þ
@@ -464,6 +474,8 @@
      ;;; ¥¹¥È¥í¡¼¥¯É½
;;; ¼¡¤ËÆþÎϤ¹¤ë¥­¡¼¤Èʸ»ú¤ÎÂбþ¤Î¡¢get-candidate-handlerÍÑ·Á¼°¤Ç¤Î¥ê¥¹¥È
      (stroke-help ())
+     ;;; ¼«Æ°¥Ø¥ë¥×
+     (auto-help ())
      ;;; ¸ò¤¼½ñ¤­ÊÑ´¹¼­½ñ¤Ø¤ÎºÆµ¢ÅªÅÐÏ¿¤Î¤¿¤á¤Î»Ò¥³¥ó¥Æ¥­¥¹¥È
      (child-context ())
      ;;; »Ò¥³¥ó¥Æ¥­¥¹¥È¤Î¼ïÎà
@@ -1158,6 +1170,7 @@
                     ((tutcode-mazegaki-start) "¡þ")
                     ((tutcode-latin-conv-start) "/")
                     ((tutcode-bushu-start) "¢¡")
+                    ((tutcode-auto-help-redisplay) "¢ã")
                     (else cand))))
                 (set! label-cand-alist
                   (cons (list label candstr) label-cand-alist))))))
@@ -1179,7 +1192,7 @@
                     (list (car elem) (cdr (cadr elem))))
                   (cdr guide)))))
            (nextguide-candcombined
- ;; Îã:(("u" ("²°" ("u" "c")) ("ÃÓ" ("u" "v")))) -> (("u" ">ÃÓ²°")) + ;; Îã:(("u" ("²°" ("u" "c")) ("ÃÓ" ("u" "v")))) -> (("u" "+ÃÓ²°"))
             (map
               (lambda (elem)
                 (let*
@@ -1197,7 +1210,7 @@
                   (list (car elem) combined)))
               nextguide)))
           (tutcode-context-set-guide! pc nextguide)
-          ;; ɽ¼¨¤¹¤ë¸õÊäʸ»úÎó¤ò¡¢½Ï¸ì¥¬¥¤¥É(>)ÉÕ¤­Ê¸»úÎó¤ËÃÖ¤­´¹¤¨¤ë
+          ;; ɽ¼¨¤¹¤ë¸õÊäʸ»úÎó¤ò¡¢½Ï¸ì¥¬¥¤¥É(+)ÉÕ¤­Ê¸»úÎó¤ËÃÖ¤­´¹¤¨¤ë
           (for-each
             (lambda (elem)
               (let*
@@ -1235,26 +1248,26 @@
 ;;; Éô¼ó¹çÀ®ÊÑ´¹¡¦¸ò¤¼½ñ¤­ÊÑ´¹¤Ç³ÎÄꤷ¤¿Ê¸»ú¤ÎÂǤÁÊý¤òɽ¼¨¤¹¤ë¡£
 ;;; ɽ·Á¼°¤Î¸õÊ䥦¥£¥ó¥É¥¦¤Î¾ì¹ç¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ëɽ¼¨¤¹¤ë¡£
 ;;; 1¤¬Âè1ÂǸ°¡¢2¤¬Âè2ÂǸ°¡£¡Ö·È¡×
-;;;  ¡¦¡¦¡¦¡¦    ¡¦¡¦¡¦¡¦
-;;;  ¡¦¡¦¡¦¡¦    ¡¦¡¦3 ¡¦
-;;;  ¡¦¡¦¡¦¡¦1   ¡¦¡¦¡¦¡¦
-;;;  ¡¦¡¦¡¦2     ¡¦¡¦¡¦¡¦
+;;;  ¡¦¡¦¡¦¡¦        ¡¦¡¦¡¦¡¦
+;;;  ¡¦¡¦¡¦¡¦        ¡¦¡¦3 ¡¦
+;;;  ¡¦¡¦¡¦¡¦1(·È)   ¡¦¡¦¡¦¡¦
+;;;  ¡¦¡¦¡¦2         ¡¦¡¦¡¦¡¦
;;; ¸ò¤¼½ñ¤­ÊÑ´¹¤ÇÊ£¿ô¤Îʸ»ú¡Ö·ÈÂӡפòÊÑ´¹¤·¤¿¾ì¹ç¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ëɽ¼¨¤¹¤ë¡£
-;;;  ¡¦¡¦¡¦¡¦    ¡¦¡¦¡¦¡¦
-;;;  ¡¦¡¦a ¡¦    ¡¦¡¦3 ¡¦
-;;;  ¡¦¡¦¡¦¡¦1b  ¡¦¡¦c ¡¦
-;;;  ¡¦¡¦¡¦2     ¡¦¡¦¡¦¡¦
+;;;  ¡¦¡¦¡¦    ¡¦        ¡¦¡¦¡¦¡¦
+;;;  ¡¦¡¦a(ÂÓ) ¡¦        ¡¦¡¦3 ¡¦
+;;;  ¡¦¡¦¡¦    ¡¦1(·È)b  ¡¦¡¦c ¡¦
+;;;  ¡¦¡¦¡¦    2         ¡¦¡¦¡¦¡¦
 ;;; ³ÎÄꤷ¤¿Ê¸»ú¤¬Ä¾ÀÜÆþÎϤǤ­¤Ê¤¤¾ì¹ç¡¢Ã±½ã¤ÊÉô¼ó¹çÀ®ÊÑ´¹¤ÇÆþÎϤǤ­¤ì¤Ð¡¢
 ;;; °Ê²¼¤Î¤è¤¦¤ËÉô¼ó¹çÀ®ÊÑ´¹ÊýË¡¤òɽ¼¨¤¹¤ë¡£¡Öͫݵ¡×
-;;; ¨£¨¡¨¨¨¡¨¨¨¡¨¨¨¡¨¨¨¡¨¨¨¡¨¨¨¡¨¡¨¡¨¡¨¡¨¨¨¡¨¨¨¡¨¨¨¡¨¨¨¡¨¤
-;;; ¨¢  ¨¢  ¨¢  ¨¢  ¨¢  ¨¢  ¨¢          ¨¢  ¨¢  ¨¢  ¨¢  ¨¢
-;;; ¨§¨¡¨«¨¡¨«¨¡¨«¨¡¨«¨¡¨©  ¨§¨¡¨¡¨¡¨¡¨¡¨«¨¡¨«¨¡¨«¨¡¨«¨¡¨©
-;;; ¨¢  ¨¢  ¨¢  ¨¢  ¨¢b ¨¢  ¨¢          ¨¢  ¨¢  ¨¢f ¨¢  ¨¢
-;;; ¨§¨¡¨«¨¡¨«¨¡¨«¨¡¨«¨¡¨©  ¨§¨¡¨¡¨¡¨¡¨¡¨«¨¡¨«¨¡¨«¨¡¨«¨¡¨©
-;;; ¨¢  ¨¢3 ¨¢  ¨¢  ¨¢  ¨¢  ¨¢          ¨¢  ¨¢  ¨¢1 ¨¢  ¨¢
-;;; ¨§¨¡¨«¨¡¨«¨¡¨«¨¡¨«¨¡¨©  ¨§¨¡¨¡¨¡¨¡¨¡¨«¨¡¨«¨¡¨«¨¡¨«¨¡¨©
-;;; ¨¢  ¨¢  ¨¢d ¨¢  ¨¢e ¨¢  ¨¢2a(¢¥ÎÓ´Ì)¨¢  ¨¢  ¨¢  ¨¢  ¨¢
-;;; ¨¦¨¡¨ª¨¡¨ª¨¡¨ª¨¡¨ª¨¡¨ª¨¡¨ª¨¡¨¡¨¡¨¡¨¡¨ª¨¡¨ª¨¡¨ª¨¡¨ª¨¡¨¥
+;;;    ¨£¨¡¨¨¨¡¨¨¨¡¨¨¨¡¨¨¨¡¨¨¨¡¨¨¨¡¨¡¨¡¨¡¨¡¨¡¨¨¨¡¨¨¨¡¨¨¨¡¨¡¨¡¨¨¨¡¨¤
+;;;    ¨¢  ¨¢  ¨¢  ¨¢  ¨¢  ¨¢  ¨¢            ¨¢  ¨¢  ¨¢      ¨¢  ¨¢
+;;;    ¨§¨¡¨«¨¡¨«¨¡¨«¨¡¨«¨¡¨©  ¨§¨¡¨¡¨¡¨¡¨¡¨¡¨«¨¡¨«¨¡¨«¨¡¨¡¨¡¨«¨¡¨©
+;;;    ¨¢  ¨¢  ¨¢  ¨¢  ¨¢b ¨¢  ¨¢            ¨¢  ¨¢  ¨¢f     ¨¢  ¨¢
+;;;    ¨§¨¡¨«¨¡¨«¨¡¨«¨¡¨«¨¡¨©  ¨§¨¡¨¡¨¡¨¡¨¡¨¡¨«¨¡¨«¨¡¨«¨¡¨¡¨¡¨«¨¡¨©
+;;;    ¨¢  ¨¢3 ¨¢  ¨¢  ¨¢  ¨¢  ¨¢            ¨¢  ¨¢  ¨¢1(Í«) ¨¢  ¨¢
+;;;    ¨§¨¡¨«¨¡¨«¨¡¨«¨¡¨«¨¡¨©  ¨§¨¡¨¡¨¡¨¡¨¡¨¡¨«¨¡¨«¨¡¨«¨¡¨¡¨¡¨«¨¡¨©
+;;;    ¨¢  ¨¢  ¨¢d ¨¢  ¨¢e ¨¢  ¨¢2a(ݵ¢¥ÎÓ´Ì)¨¢  ¨¢  ¨¢      ¨¢  ¨¢
+;;;    ¨¦¨¡¨ª¨¡¨ª¨¡¨ª¨¡¨ª¨¡¨ª¨¡¨ª¨¡¨¡¨¡¨¡¨¡¨¡¨ª¨¡¨ª¨¡¨ª¨¡¨¡¨¡¨ª¨¡¨¥
 ;;;
 ;;; Ä̾ï¤Î¸õÊ䥦¥£¥ó¥É¥¦¤Î¾ì¹ç¤Ï¡¢°Ê²¼¤Î¤è¤¦¤Ëɽ¼¨¤¹¤ë¡£
 ;;;   Í« lns
@@ -1280,16 +1293,16 @@
(tutcode-auto-help-update-stroke-alist-normal pc () helpstrlist)))))
         (if (not (null? label-cands-alist))
           (let
-            ((stroke-help
+            ((auto-help
               (map
                 (lambda (elem)
                   (list (tutcode-make-string (cdr elem)) (car elem) ""))
                 label-cands-alist)))
-            (tutcode-context-set-stroke-help! pc stroke-help)
+            (tutcode-context-set-auto-help! pc auto-help)
             (tutcode-context-set-candidate-window! pc
               'tutcode-candidate-window-auto-help)
             (im-activate-candidate-selector pc
- (length stroke-help) tutcode-nr-candidate-max-for-kigou-mode))))))) + (length auto-help) tutcode-nr-candidate-max-for-kigou-mode)))))))

 ;;; ¼«Æ°¥Ø¥ë¥×¤Îɽ·Á¼°É½¼¨¤Ë»È¤¦alist¤ò¹¹¿·¤¹¤ë¡£
;;; alist¤Ï°Ê²¼¤Î¤è¤¦¤ËÂǸ°¤ò¼¨¤¹¥é¥Ù¥ëʸ»ú¤È¡¢³ºÅö¥»¥ë¤Ëɽ¼¨¤¹¤ëʸ»úÎó¤Î¥ê¥¹¥È
@@ -1445,6 +1458,17 @@
         label-cands-alist)
       (cons (list label cand) label-cands-alist))))

+;;; ¼«Æ°¥Ø¥ë¥×:ľ¶á¤Î¼«Æ°¥Ø¥ë¥×¤òºÆÉ½¼¨¤¹¤ë
+(define (tutcode-auto-help-redisplay pc)
+  (let ((help (tutcode-context-auto-help pc)))
+    (if (and help (> (length help) 0))
+      (begin
+        (tutcode-context-set-candidate-window! pc
+          'tutcode-candidate-window-auto-help)
+        (im-activate-candidate-selector pc
+          (length help)
+          tutcode-nr-candidate-max-for-kigou-mode)))))
+
 ;;; preeditɽ¼¨¤ò¹¹¿·¤¹¤ë¡£
 (define (tutcode-do-update-preedit pc)
   (let ((stat (tutcode-context-state pc))
@@ -1775,6 +1799,8 @@
                 ((tutcode-bushu-start)
                   (tutcode-context-set-state! pc 'tutcode-state-bushu)
                   (tutcode-append-string pc "¢¥"))
+                ((tutcode-auto-help-redisplay)
+                  (tutcode-auto-help-redisplay pc))
                 (else
                   (tutcode-commit pc res)
                   (if tutcode-use-completion?
@@ -1954,8 +1980,18 @@
            (set! res (charcode->string key)))
           (else
            (set! res (tutcode-push-key! pc (charcode->string key)))
-           (if (not res)
-            (tutcode-check-stroke-help-window-begin pc))))
+           (case res
+            ((tutcode-mazegaki-start)
+              (set! res #f))
+            ((tutcode-latin-conv-start)
+              (set! res #f))
+            ((tutcode-auto-help-redisplay)
+              (tutcode-auto-help-redisplay pc)
+              (set! res #f))
+            ((tutcode-bushu-start)
+              (set! res #f))
+            ((#f)
+              (tutcode-check-stroke-help-window-begin pc)))))
         (if res
           (begin
             (tutcode-append-string pc res)
@@ -2033,6 +2069,9 @@
           (set! res #f))
         ((tutcode-latin-conv-start)
           (set! res #f))
+        ((tutcode-auto-help-redisplay)
+          (tutcode-auto-help-redisplay pc)
+          (set! res #f))
         ((tutcode-bushu-start) ; ºÆµ¢Åª¤ÊÉô¼ó¹çÀ®ÊÑ´¹
           (tutcode-append-string pc "¢¥")
           (set! res #f))
@@ -2651,10 +2690,14 @@
                     (tutcode-make-string
                       (append cands (list tutcode-guide-mark)))))
                   (list cand label "")))))))
-      ;; ²¾ÁÛ¸°È×/¼«Æ°¥Ø¥ë¥×
- ((and (not (eq? (tutcode-context-state tc) 'tutcode-state-converting)) - (or tutcode-use-stroke-help-window? tutcode-use-auto-help-window?))
+      ;; ²¾ÁÛ¸°È×
+      ((eq? (tutcode-context-candidate-window tc)
+            'tutcode-candidate-window-stroke-help)
         (nth idx (tutcode-context-stroke-help tc)))
+      ;; ¼«Æ°¥Ø¥ë¥×
+      ((eq? (tutcode-context-candidate-window tc)
+            'tutcode-candidate-window-auto-help)
+        (nth idx (tutcode-context-auto-help tc)))
       ;; ¸ò¤¼½ñ¤­ÊÑ´¹
       (else
         (let* ((cand (tutcode-get-nth-candidate tc idx))
@@ -2883,13 +2926,18 @@
         '(tutcode-latin-conv-start)))
      (bushu-rule
       (make-subrule tutcode-bushu-start-sequence
-        '(tutcode-bushu-start))))
+        '(tutcode-bushu-start)))
+     (auto-help-rule
+      (make-subrule tutcode-auto-help-redisplay-sequence
+        '(tutcode-auto-help-redisplay))))
     (if mazegaki-rule
       (tutcode-rule-set-sequences! mazegaki-rule))
     (if latin-conv-rule
       (tutcode-rule-set-sequences! latin-conv-rule))
     (if bushu-rule
-      (tutcode-rule-set-sequences! bushu-rule))))
+      (tutcode-rule-set-sequences! bushu-rule))
+    (if auto-help-rule
+      (tutcode-rule-set-sequences! auto-help-rule))))

 ;;; ¥³¡¼¥Éɽ¤Î°ìÉô¤ÎÄêµÁ¤ò¾å½ñ¤­Êѹ¹/Äɲ乤롣~/.uim¤«¤é¤Î»ÈÍѤòÁÛÄê¡£
 ;;; ¸Æ¤Ó½Ð¤·»þ¤Ë¤Ïtutcode-rule-userconfig¤ËÅÐÏ¿¤·¤Æ¤ª¤¯¤À¤±¤Ç¡¢

Reply via email to