From 44bec1714f3b8df0973cc79350608ff380b3de07 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 17 Jul 2000 23:52:42 +0000 Subject: [PATCH] (kkc-after-update-conversion-functions): New variable. (kkc-update-conversion): Run functions in it at the tail. --- lisp/international/kkc.el | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/lisp/international/kkc.el b/lisp/international/kkc.el index 70c7d501e2a..4012a6ed3e6 100644 --- a/lisp/international/kkc.el +++ b/lisp/international/kkc.el @@ -211,6 +211,14 @@ area while indicating the current selection by `'." (defvar kkc-converting nil) +;;;###autoload +(defvar kkc-after-update-conversion-functions nil + "Functions to run after a conversion is selected in `japanese' input method. +With this input method, a user can select a proper conversion from +candidate list. Each time he changes the selection, functions in this +list are called with two arguments; starting and ending buffer +positions that contains the current selection.") + ;;;###autoload (defun kkc-region (from to) "Convert Kana string in the current region to Kanji-Kana mixed string. @@ -635,7 +643,11 @@ and change the current conversion to the last one in the group." (move-overlay kkc-overlay-head (overlay-start kkc-overlay-head) pos) (delete-region (point) (overlay-end kkc-overlay-tail))))) - (goto-char (overlay-end kkc-overlay-tail))) + (unwind-protect + (run-hook-with-args 'kkc-after-update-conversion-functions + (overlay-start kkc-overlay-head) + (overlay-end kkc-overlay-head)) + (goto-char (overlay-end kkc-overlay-tail)))) ;; (provide 'kkc) -- 2.39.2