こんにちは。
Emacsの中でanthy.elを使っていますが、気になるところがあるのでパッチを書きました。

fix-typo.patch:
ahthy-hilight-faceというのはanthy-highlight-faceの誤りのようなので直しました。

add-hook.patch:
anthy-mode-hookというモード切り替え時に走るフックを追加します。
こんなふうにすると、モード切り替え時にカーソルの色を変えられます。
  (add-hook 'anthy-mode-hook
            #'(lambda()
                (set-cursor-color (if anthy-mode '"cyan" '"white"))))
leimにもフックがあるのですが、そちらでやるとモードラインが ((((あ)))) みたいな
エラいことになりました。

add-insert-convert.patch:
文字を入力すると続けて変換します。
こんな感じにすると、「。」を入力すると変換も始まります。

  (define-key anthy-preedit-keymap "." 'anthy-insert-and-convert)
diff -Narup a/src-util/anthy.el b/src-util/anthy.el
--- a/src-util/anthy.el 2007-01-18 00:57:45.000000000 +0900
+++ b/src-util/anthy.el 2008-07-31 02:35:01.000000000 +0900
@@ -68,7 +68,7 @@
   "anthy-agentのPATH名")
 
 ;; face
-(defvar anthy-hilight-face nil)
+(defvar anthy-highlight-face nil)
 (defvar anthy-underline-face nil)
 (copy-face 'highlight 'anthy-highlight-face)
 (set-face-underline-p 'anthy-highlight-face t)
diff -Narup a/src-util/anthy.el b/src-util/anthy.el
--- a/src-util/anthy.el 2007-01-18 00:57:45.000000000 +0900
+++ b/src-util/anthy.el 2008-07-31 02:38:12.000000000 +0900
@@ -812,7 +812,8 @@
       (progn
        (anthy-check-agent)
        (anthy-mode-on))
-    (anthy-mode-off)))
+    (anthy-mode-off))
+  (run-hooks 'anthy-mode-hook))
 
 (defun anthy-mode (&optional arg)
   "Start Anthy conversion system."
diff -Narup a/src-util/anthy.el b/src-util/anthy.el
--- a/src-util/anthy.el 2007-01-18 00:57:45.000000000 +0900
+++ b/src-util/anthy.el 2008-07-31 02:39:13.000000000 +0900
@@ -917,5 +917,13 @@
   (anthy-send-recv-command " SET_PREEDIT_MODE 0\n")
   (anthy-hiragana-map))
 
+(defun anthy-insert-and-convert (ch)
+  (interactive "P")
+  (if (< 0 (length anthy-preedit))
+      (progn
+        (anthy-insert ch)
+        (anthy-handle-normal-key "(space)"))
+    (anthy-insert ch)))
+
 ;;;
 ;;; anthy.el ends here
_______________________________________________
Anthy-dev mailing list
Anthy-dev@lists.sourceforge.jp
http://lists.sourceforge.jp/mailman/listinfo/anthy-dev

メールによる返信