Mercurial > emacs
comparison lisp/international/kkc.el @ 30256:e4b4bca5087a
(kkc-after-update-conversion-functions): New variable.
(kkc-update-conversion): Run functions in it at the tail.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 17 Jul 2000 23:52:42 +0000 |
parents | 9a4962f4ea62 |
children | 6c51a4e8bf88 |
comparison
equal
deleted
inserted
replaced
30255:ed4c1e5caf4b | 30256:e4b4bca5087a |
---|---|
208 (put 'kkc-error 'error-conditions '(kkc-error error)) | 208 (put 'kkc-error 'error-conditions '(kkc-error error)) |
209 (defun kkc-error (&rest args) | 209 (defun kkc-error (&rest args) |
210 (signal 'kkc-error (apply 'format args))) | 210 (signal 'kkc-error (apply 'format args))) |
211 | 211 |
212 (defvar kkc-converting nil) | 212 (defvar kkc-converting nil) |
213 | |
214 ;;;###autoload | |
215 (defvar kkc-after-update-conversion-functions nil | |
216 "Functions to run after a conversion is selected in `japanese' input method. | |
217 With this input method, a user can select a proper conversion from | |
218 candidate list. Each time he changes the selection, functions in this | |
219 list are called with two arguments; starting and ending buffer | |
220 positions that contains the current selection.") | |
213 | 221 |
214 ;;;###autoload | 222 ;;;###autoload |
215 (defun kkc-region (from to) | 223 (defun kkc-region (from to) |
216 "Convert Kana string in the current region to Kanji-Kana mixed string. | 224 "Convert Kana string in the current region to Kanji-Kana mixed string. |
217 Users can select a desirable conversion interactively. | 225 Users can select a desirable conversion interactively. |
633 (insert (aref kkc-current-key i)) | 641 (insert (aref kkc-current-key i)) |
634 (setq i (1+ i))) | 642 (setq i (1+ i))) |
635 (move-overlay kkc-overlay-head | 643 (move-overlay kkc-overlay-head |
636 (overlay-start kkc-overlay-head) pos) | 644 (overlay-start kkc-overlay-head) pos) |
637 (delete-region (point) (overlay-end kkc-overlay-tail))))) | 645 (delete-region (point) (overlay-end kkc-overlay-tail))))) |
638 (goto-char (overlay-end kkc-overlay-tail))) | 646 (unwind-protect |
647 (run-hook-with-args 'kkc-after-update-conversion-functions | |
648 (overlay-start kkc-overlay-head) | |
649 (overlay-end kkc-overlay-head)) | |
650 (goto-char (overlay-end kkc-overlay-tail)))) | |
639 | 651 |
640 ;; | 652 ;; |
641 (provide 'kkc) | 653 (provide 'kkc) |
642 | 654 |
643 ;; kkc.el ends here | 655 ;; kkc.el ends here |