egg-980304.
[elisp/egg.git] / its / ascii.el
1 ;;; its/ascii.el --- ASCII Input in Egg Input Method Architecture
2
3 ;; Copyright (C) 1997, 1998 Mule Project,
4 ;; Powered by Electrotechnical Laboratory, JAPAN.
5 ;; Project Leader: Satoru Tomura <tomura@etl.go.jp>
6
7 ;; Author: KATAYAMA Yoshio <kate@pfu.co.jp>
8
9 ;; This file will be part of GNU Emacs (in future).
10
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
14 ;; any later version.
15
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 ;; GNU General Public License for more details.
20
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
25
26 ;;; Commentary:
27 ;;
28 ;; Symbol input is desined by jiro@math.keio.ac.jp (TANAKA Jiro)
29 ;; This file is based on the rules of its/hira.el in Mule-2.3 distribution.
30 ;;
31
32 ;;; Code:
33
34 (eval-when-compile
35   (require 'its))
36
37 (define-its-state-machine its-up-map
38   "upcase" "aA" nil nil
39   "Map for upcase input."
40
41   (let ((i ? ))
42     (while (<= i ?~)
43       (its-defrule (char-to-string i) (upcase (char-to-string i)))
44       (setq i (1+ i)))))
45
46 (define-its-state-machine its-down-map
47   "downcase" "aa" nil nil
48   "Map for downcase input."
49
50   (let ((i ? ))
51     (while (<= i ?~)
52       (its-defrule (char-to-string i) (char-to-string i))
53       (setq i (1+ i)))))
54
55 (provide 'its/ascii)