annotate lisp/egg/egg-cwnn-leim.el @ 223:2c611d1463a6 r20-4b10

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