Remove non-free old and crusty clearcase pkg
[packages] / mule-packages / skk / skk-leim.el
1 ;;; skk-leim.el --- SKK related code for LEIM
2 ;; Copyright (C) 1997, 1999
3 ;; Murata Shuuichirou <mrt@astec.co.jp>
4 ;;
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 $
7 ;; Keywords: japanese
8 ;; Last Modified: $Date: 2007-10-01 17:30:29 $
9
10 ;; This file is not part of SKK yet.
11
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)
15 ;; any later version.
16
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.
21
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.
26
27 ;;; Code:
28 (eval-when-compile (require 'skk))
29 (require 'skk-foreword)
30
31 ;;;###autoload
32 (defun skk-activate (&optional name)
33   (setq inactivate-current-input-method-function 'skk-inactivate)
34   (skk-mode 1)
35   (if (eq (selected-window) (minibuffer-window))
36       (add-hook 'minibuffer-exit-hook 'skk-leim-exit-from-minibuffer)))
37
38 ;;;###autoload
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)))
44
45 ;;;###autoload
46 (defun skk-inactivate ()
47   (skk-mode -1))
48
49 ;;;###autoload
50 (defun skk-auto-fill-inactivate ()
51   (skk-auto-fill-mode -1))
52
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)))
57
58 ;;;###autoload
59 (register-input-method
60  "japanese-skk" "Japanese"
61  'skk-activate nil
62  "Simple Kana to Kanji conversion program")
63
64 ;;;###autoload
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")
69
70 (provide 'skk-leim)
71 ;;; skk-leim.el ends here