From: Kenichi Handa Date: Mon, 18 Aug 1997 10:51:45 +0000 (+0000) Subject: (kkc-region): New arg X-Git-Tag: emacs-20.1~542 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3847cd47c1a2a8f21c6d944c9b35c3554c360141;p=emacs.git (kkc-region): New arg kkc-mode-exit-function. --- diff --git a/lisp/international/kkc.el b/lisp/international/kkc.el index 5c329c6380e..a45de7f7232 100644 --- a/lisp/international/kkc.el +++ b/lisp/international/kkc.el @@ -202,10 +202,11 @@ Commands: kkc-current-conversions (cons 0 nil))))))) ;;;###autoload -(defun kkc-region (from to) +(defun kkc-region (from to &optional kkc-mode-exit-function) "Convert Kana string in the current region to Kanji-Kana mixed string. After one candidate of conversion is shown in the region, users are -put in KKC major mode to select a desirable conversion." +put in KKC major mode to select a desirable conversion. +Optional arg KKC-MODE-EXIT-FUNCTION if non-nil is called on exiting KKC mode." (interactive "r") (setq kkc-original-kana (buffer-substring from to)) (goto-char from) @@ -246,8 +247,11 @@ put in KKC major mode to select a desirable conversion." (goto-char (overlay-end kkc-overlay-tail)) (delete-overlay kkc-overlay-head) (delete-overlay kkc-overlay-tail) - (use-local-map previous-local-map))) - kkc-canceled) + (use-local-map previous-local-map) + (if (and kkc-mode-exit-function + (fboundp kkc-mode-exit-function)) + (funcall kkc-mode-exit-function (if kkc-canceled + (cons kkc-canceled (point)))))))) (defun kkc-terminate () "Exit from KKC mode by fixing the current conversion."