annotate lisp/its/its-hankaku.el @ 226:eea38c7ad7b4

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