221
|
1 ;;; egg-cwnn-leim.el --- Egg/CWnn-related code for LEIM
|
|
2
|
|
3 ;; Copyright (C) 1997 Stephen Turnbull <turnbull@sk.tsukuba.ac.jp>
|
|
4 ;; Copyright (C) 1997 Free Software Foundation, Inc.
|
|
5 ;;
|
|
6 ;; Shamelessly ripped off from
|
|
7 ;;
|
|
8 ;; skk-leim.el --- SKK related code for LEIM
|
|
9 ;; Copyright (C) 1997
|
|
10 ;; Murata Shuuichirou <mrt@mickey.ai.kyutech.ac.jp>
|
|
11 ;;
|
|
12 ;; Author: Stephen Turnbull <turnbull@sk.tsukuba.ac.jp>
|
|
13 ;; Version: egg-leim.el,v 1.1 1997/10/27 09:59:23 steve Exp steve
|
|
14 ;; Keywords: japanese, input method, LEIM
|
|
15 ;; Last Modified: 1997/10/27 09:59:23
|
|
16
|
|
17 ;; This program is free software; you can redistribute it and/or modify
|
|
18 ;; it under the terms of the GNU General Public License as published by
|
|
19 ;; the Free Software Foundation; either versions 2, or (at your option)
|
|
20 ;; any later version.
|
|
21
|
|
22 ;; This program is distributed in the hope that it will be useful
|
|
23 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
24 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
25 ;; GNU General Public License for more details.
|
|
26
|
|
27 ;; You should have received a copy of the GNU General Public License
|
|
28 ;; along with XEmacs, see the file COPYING. If not, write to the Free
|
|
29 ;; Software Foundation Inc., 59 Temple Place - Suite 330, Boston,
|
|
30 ;; MA 02111-1307, USA.
|
|
31
|
|
32 ;;; TODO
|
|
33 ;;
|
|
34 ;; Add pointers to Egg documentation in LEIM format
|
|
35
|
|
36 ;; EGG specific setup
|
|
37 (define-egg-environment 'chinese-pinyin
|
|
38 "Chinese pinyin settings for egg."
|
|
39 (lambda ()
|
|
40 (when (not (featurep 'egg-cnpinyin))
|
|
41 (load "its/its-pinyin")
|
|
42 (setq its:*standard-modes*
|
|
43 (append
|
|
44 (list (its:get-mode-map "PinYin"))
|
|
45 its:*standard-modes*))
|
|
46 (provide 'egg-cnpinyin))
|
|
47 (setq wnn-server-type 'cserver)
|
|
48 (setq-default its:*current-map* (its:get-mode-map "PinYin"))))
|
|
49
|
|
50 (define-egg-environment 'chinese-zhuyin
|
|
51 "Chinese zhuyin settings for egg."
|
|
52 (lambda ()
|
|
53 (when (not (featurep 'egg-cnzhuyin))
|
|
54 (load "its/its-zhuyin")
|
|
55 (setq its:*standard-modes*
|
|
56 (append
|
|
57 (list (its:get-mode-map "zhuyin"))
|
|
58 its:*standard-modes*))
|
|
59 (provide 'egg-cnzhuyin))
|
|
60 (setq wnn-server-type 'cserver)
|
|
61 (setq-default its:*current-map* (its:get-mode-map "zhuyin"))))
|
|
62
|
|
63
|
|
64 (defun egg-pinyin-activate (&optional name)
|
|
65 (if (featurep 'wnn)
|
|
66 (require 'egg)
|
|
67 (error "Wnn is not built into this XEmacs"))
|
|
68 (setq inactivate-current-input-method-function 'egg-pinyin-inactivate)
|
|
69 (setq egg-default-startup-file "eggrc-wnn")
|
|
70 (require 'egg-wnn)
|
|
71 (let ((func (get 'chinese-pinyin 'set-egg-environ)))
|
|
72 (when func
|
|
73 (funcall func)))
|
|
74 (egg-mode)
|
|
75 (toggle-egg-mode))
|
|
76
|
|
77 (defun egg-pinyin-inactivate ()
|
|
78 (cond (egg:*mode-on* (toggle-egg-mode))))
|
|
79
|
|
80 (defun egg-zhuyin-activate (&optional name)
|
|
81 (if (featurep 'wnn)
|
|
82 (require 'egg)
|
|
83 (error "Wnn is not built into this XEmacs"))
|
|
84 (setq inactivate-current-input-method-function 'egg-zhuyin-inactivate)
|
|
85 (setq egg-default-startup-file "eggrc-wnn")
|
|
86 (require 'egg-wnn)
|
|
87 (let ((func (get 'chinese-zhuyin 'set-egg-environ)))
|
|
88 (when func
|
|
89 (funcall func)))
|
|
90 (egg-mode)
|
|
91 (toggle-egg-mode))
|
|
92
|
|
93 (defun egg-zhuyin-inactivate ()
|
|
94 (cond (egg:*mode-on* (toggle-egg-mode))))
|
|
95
|
|
96 (register-input-method
|
|
97 'chinese-egg-pinyin "Chinese"
|
|
98 'egg-zhuyin-activate nil
|
|
99 "EGG - an interface to the CWnn Chinese conversion program" )
|
|
100
|
|
101 (register-input-method
|
|
102 'chinese-egg-zhuyin "Chinese"
|
|
103 'egg-zhuyin-activate nil
|
|
104 "EGG - an interface to the CWnn Chinese conversion program" )
|
|
105
|
|
106 (provide 'egg-cwnn-leim)
|
|
107
|
|
108 ;;; egg-cwnn-leim.el ends here
|