comparison lisp/its/its-hankaku.el @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents
children
comparison
equal deleted inserted replaced
69:804d1389bcd6 70:131b0175ea99
1 ;; Basic Roma-to-Kana Translation Table for Egg
2 ;; Coded by S.Tomura, Electrotechnical Lab. (tomura@etl.go.jp)
3
4 ;; This file is part of Egg on Nemacs (Japanese Environment)
5
6 ;; Egg is distributed in the forms of patches to GNU
7 ;; Emacs under the terms of the GNU EMACS GENERAL PUBLIC
8 ;; LICENSE which is distributed along with GNU Emacs by the
9 ;; Free Software Foundation.
10
11 ;; Egg is distributed in the hope that it will be useful,
12 ;; but WITHOUT ANY WARRANTY; without even the implied
13 ;; warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 ;; PURPOSE. See the GNU EMACS GENERAL PUBLIC LICENSE for
15 ;; more details.
16
17 ;; You should have received a copy of the GNU EMACS GENERAL
18 ;; PUBLIC LICENSE along with Nemacs; see the file COPYING.
19 ;; If not, write to the Free Software Foundation, 675 Mass
20 ;; Ave, Cambridge, MA 02139, USA.
21
22 ;; 92.3.16 modified for Mule Ver.0.9.1 by K.Handa <handa@etl.go.jp>
23 ;; 92.3.23 modified for Mule Ver.0.9.1 by K.Handa <handa@etl.go.jp>
24 ;; defrule -> its-defrule, define-its-mode -> its-define-mode
25
26 (defvar digit-characters
27 '( "1" "2" "3" "4" "5" "6" "7" "8" "9" "0" ))
28
29 (defvar symbol-characters
30 '( " " "!" "@" "#" "$" "%" "^" "&" "*" "(" ")"
31 "-" "=" "`" "\\" "|" "_" "+" "~" "[" "]" "{" "}"
32 ":" ";" "\"" "'" "<" ">" "?" "/" "," "." ))
33
34 (defvar downcase-alphabets
35 '("a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n"
36 "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z"))
37
38 (defvar upcase-alphabets
39 '("A" "B" "C" "D" "E" "F" "G" "H" "I" "J" "K" "L" "M" "N"
40 "O" "P" "Q" "R" "S" "T" "U" "V" "W" "X" "Y" "Z"))
41
42 ;;;;
43 ;;;;
44 ;;;;
45
46 ;; 92.3.16 by K.Handa
47 ;;(define-its-mode "downcase" " a a" t)
48 (its-define-mode "downcase" "aa" t)
49
50 (dolist (digit digit-characters)
51 (its-defrule digit digit))
52
53 (dolist (symbol symbol-characters)
54 (its-defrule symbol symbol))
55
56 (dolist (downcase downcase-alphabets)
57 (its-defrule downcase downcase))
58
59 (dolist (upcase upcase-alphabets)
60 (its-defrule upcase upcase))
61
62 ;;;;
63 ;;;;
64 ;;;;
65
66 (defun upcase-character (ch)
67 (if (and (<= ?a ch) (<= ch ?z))
68 (+ ?A (- ch ?a))
69 ch))
70
71 ;; 92.3.16 by K.Handa
72 ;;(define-its-mode "upcase" " a A" t)
73 (its-define-mode "upcase" "aA" t);;; 93.7.21 by S.Tomura
74
75 (dolist (digit digit-characters)
76 (its-defrule digit digit))
77
78 (dolist (symbol symbol-characters)
79 (its-defrule symbol symbol))
80
81 (dolist (downcase downcase-alphabets)
82 (its-defrule downcase (char-to-string (upcase-character (string-to-char downcase)))))
83
84 (dolist (upcase upcase-alphabets)
85 (its-defrule upcase upcase))
86