1 ;;; skk-leim.el --- SKK related code for LEIM
2 ;; Copyright (C) 1997, 1999
3 ;; Murata Shuuichirou <mrt@astec.co.jp>
5 ;; Author: Murata Shuuichirou <mrt@mickey.ai.kyutech.ac.jp>
6 ;; Version: $Id: skk-leim.el,v 1.5 2007-10-01 17:30:29 aidan Exp $
8 ;; Last Modified: $Date: 2007-10-01 17:30:29 $
10 ;; This file is not part of SKK yet.
12 ;; SKK is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by
14 ;; the Free Software Foundation; either versions 2, or (at your option)
17 ;; SKK is distributed in the hope that it will be useful
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;; GNU General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with SKK, see the file COPYING. If not, write to the Free
24 ;; Software Foundation Inc., 59 Temple Place - Suite 330, Boston,
25 ;; MA 02111-1307, USA.
28 (eval-when-compile (require 'skk))
29 (require 'skk-foreword)
32 (defun skk-activate (&optional name)
33 (setq inactivate-current-input-method-function 'skk-inactivate)
35 (if (eq (selected-window) (minibuffer-window))
36 (add-hook 'minibuffer-exit-hook 'skk-leim-exit-from-minibuffer)))
39 (defun skk-auto-fill-activate (&optional name)
40 (setq inactivate-current-input-method-function 'skk-auto-fill-inactivate)
41 (skk-auto-fill-mode 1)
42 (if (eq (selected-window) (minibuffer-window))
43 (add-hook 'minibuffer-exit-hook 'skk-leim-exit-from-minibuffer)))
46 (defun skk-inactivate ()
50 (defun skk-auto-fill-inactivate ()
51 (skk-auto-fill-mode -1))
53 (defun skk-leim-exit-from-minibuffer ()
54 (inactivate-input-method)
55 (if (<= (minibuffer-depth) 1)
56 (remove-hook 'minibuffer-exit-hook 'skk-leim-exit-from-minibuffer)))
59 (register-input-method
60 "japanese-skk" "Japanese"
62 "Simple Kana to Kanji conversion program")
65 (register-input-method
66 "japanese-skk-auto-fill" "Japanese"
67 'skk-auto-fill-activate nil
68 "Simple Kana to Kanji conversion program with auto-fill")
71 ;;; skk-leim.el ends here