summaryrefslogtreecommitdiff
path: root/lisp/language
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/language')
-rw-r--r--lisp/language/china-util.el271
-rw-r--r--lisp/language/chinese.el364
-rw-r--r--lisp/language/cyril-util.el126
-rw-r--r--lisp/language/cyrillic.el510
-rw-r--r--lisp/language/czech.el3
-rw-r--r--lisp/language/devan-util.el56
-rw-r--r--lisp/language/devanagari.el11
-rw-r--r--lisp/language/english.el23
-rw-r--r--lisp/language/ethio-util.el2903
-rw-r--r--lisp/language/ethiopic.el49
-rw-r--r--lisp/language/european.el747
-rw-r--r--lisp/language/georgian.el16
-rw-r--r--lisp/language/greek.el56
-rw-r--r--lisp/language/hebrew.el40
-rw-r--r--lisp/language/ind-util.el1050
-rw-r--r--lisp/language/indian.el40
-rw-r--r--lisp/language/japanese.el240
-rw-r--r--lisp/language/kannada.el6
-rw-r--r--lisp/language/knd-util.el31
-rw-r--r--lisp/language/korean.el35
-rw-r--r--lisp/language/lao-util.el145
-rw-r--r--lisp/language/lao.el38
-rw-r--r--lisp/language/malayalam.el5
-rw-r--r--lisp/language/misc-lang.el10
-rw-r--r--lisp/language/mlm-util.el40
-rw-r--r--lisp/language/romanian.el26
-rw-r--r--lisp/language/slovak.el3
-rw-r--r--lisp/language/tamil.el3
-rw-r--r--lisp/language/thai-util.el183
-rw-r--r--lisp/language/thai.el52
-rw-r--r--lisp/language/tibet-util.el35
-rw-r--r--lisp/language/tibetan.el41
-rw-r--r--lisp/language/tml-util.el48
-rw-r--r--lisp/language/utf-8-lang.el21
-rw-r--r--lisp/language/viet-util.el6
-rw-r--r--lisp/language/vietnamese.el316
36 files changed, 3352 insertions, 4197 deletions
diff --git a/lisp/language/china-util.el b/lisp/language/china-util.el
index bafdce1c854..ce417796bef 100644
--- a/lisp/language/china-util.el
+++ b/lisp/language/china-util.el
@@ -6,6 +6,9 @@
;; 2005, 2006
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
+;; Copyright (C) 2003
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H13PRO009
;; Keywords: mule, multilingual, Chinese
@@ -74,7 +77,7 @@
(push i chars)
(setq i (1+ i)))
(while (< i 127)
- (push (+ i 128) chars)
+ (push (decode-char 'eight-bit (+ i 128)) chars)
(setq i (1+ i)))
(apply 'string (nreverse chars)))))
@@ -168,255 +171,25 @@ Return the length of resulting text."
(interactive)
(encode-hz-region (point-min) (point-max)))
-;; The following sets up a translation table (big5-to-cns) from Big 5
-;; to CNS encoding, using some auxiliary functions to make the code
-;; more readable.
-
-;; Many kudos to Himi! The used code has been adapted from his
-;; mule-ucs package.
-
-(eval-when-compile
-(defun big5-to-flat-code (num)
- "Convert NUM in Big 5 encoding to a `flat code'.
-0xA140 will be mapped to position 0, 0xA141 to position 1, etc.
-There are no gaps in the flat code."
-
- (let ((hi (/ num 256))
- (lo (% num 256)))
- (+ (* 157 (- hi #xa1))
- (- lo (if (>= lo #xa1) 98 64)))))
-
-(defun flat-code-to-big5 (num)
- "Convert NUM from a `flat code' to Big 5 encoding.
-This is the inverse function of `big5-to-flat-code'."
-
- (let ((hi (/ num 157))
- (lo (% num 157)))
- (+ (* 256 (+ hi #xa1))
- (+ lo (if (< lo 63) 64 98)))))
-
-(defun euc-to-flat-code (num)
- "Convert NUM in EUC encoding (in GL representation) to a `flat code'.
-0x2121 will be mapped to position 0, 0x2122 to position 1, etc.
-There are no gaps in the flat code."
-
- (let ((hi (/ num 256))
- (lo (% num 256)))
- (+ (* 94 (- hi #x21))
- (- lo #x21))))
-
-(defun flat-code-to-euc (num)
- "Convert NUM from a `flat code' to EUC encoding (in GL representation).
-The inverse function of `euc-to-flat-code'. The high and low bytes are
-returned in a list."
-
- (let ((hi (/ num 94))
- (lo (% num 94)))
- (list (+ hi #x21) (+ lo #x21))))
-
-(defun expand-euc-big5-alist (alist)
- "Create a translation table and fills it with data given in ALIST.
-Elements of ALIST can be either given as
-
- ((euc-charset . startchar) . (big5-range-begin . big5-range-end))
-
-or as
-
- (euc-character . big5-charcode)
-
-The former maps a range of glyphs in an EUC charset (where STARTCHAR
-is in GL representation) to a certain range of Big 5 encoded
-characters, the latter maps a single glyph. Glyphs which can't be
-mapped will be represented with the byte 0xFF.
-
-The return value is the filled translation table."
-
- (let ((chartable (make-char-table 'translation-table #xFF))
- char
- big5
- i
- end
- codepoint
- charset)
- (dolist (elem alist)
- (setq char (car elem)
- big5 (cdr elem))
- (cond ((and (consp char)
- (consp big5))
- (setq i (big5-to-flat-code (car big5))
- end (big5-to-flat-code (cdr big5))
- codepoint (euc-to-flat-code (cdr char))
- charset (car char))
- (while (>= end i)
- (aset chartable
- (decode-big5-char (flat-code-to-big5 i))
- (apply (function make-char)
- charset
- (flat-code-to-euc codepoint)))
- (setq i (1+ i)
- codepoint (1+ codepoint))))
- ((and (char-valid-p char)
- (numberp big5))
- (setq i (decode-big5-char big5))
- (aset chartable i char))
- (t
- (error "Unknown slot type: %S" elem))))
- ;; the return value
- chartable)))
-
-;; All non-CNS encodings are commented out.
-
-(define-translation-table 'big5-to-cns
- (eval-when-compile
- (expand-euc-big5-alist
- '(
- ;; Symbols
- ((chinese-cns11643-1 . #x2121) . (#xA140 . #xA1F5))
- (?$(G"X(B . #xA1F6)
- (?$(G"W(B . #xA1F7)
- ((chinese-cns11643-1 . #x2259) . (#xA1F8 . #xA2AE))
- ((chinese-cns11643-1 . #x2421) . (#xA2AF . #xA3BF))
- ;; Control codes (vendor dependent)
- ((chinese-cns11643-1 . #x4221) . (#xA3C0 . #xA3E0))
- ;; Level 1 Ideographs
- ((chinese-cns11643-1 . #x4421) . (#xA440 . #xACFD))
- (?$(GWS(B . #xACFE)
- ((chinese-cns11643-1 . #x5323) . (#xAD40 . #xAFCF))
- ((chinese-cns11643-1 . #x5754) . (#xAFD0 . #xBBC7))
- ((chinese-cns11643-1 . #x6B51) . (#xBBC8 . #xBE51))
- (?$(GkP(B . #xBE52)
- ((chinese-cns11643-1 . #x6F5C) . (#xBE53 . #xC1AA))
- ((chinese-cns11643-1 . #x7536) . (#xC1AB . #xC2CA))
- (?$(Gu5(B . #xC2CB)
- ((chinese-cns11643-1 . #x7737) . (#xC2CC . #xC360))
- ((chinese-cns11643-1 . #x782E) . (#xC361 . #xC3B8))
- (?$(Gxe(B . #xC3B9)
- (?$(Gxd(B . #xC3BA)
- ((chinese-cns11643-1 . #x7866) . (#xC3BB . #xC455))
- (?$(Gx-(B . #xC456)
- ((chinese-cns11643-1 . #x7962) . (#xC457 . #xC67E))
- ;; Symbols
- ((chinese-cns11643-1 . #x2621) . (#xC6A1 . #xC6BE))
- ;; Radicals
- (?$(G'#(B . #xC6BF)
- (?$(G'$(B . #xC6C0)
- (?$(G'&(B . #xC6C1)
- (?$(G'((B . #xC6C2)
- (?$(G'-(B . #xC6C3)
- (?$(G'.(B . #xC6C4)
- (?$(G'/(B . #xC6C5)
- (?$(G'4(B . #xC6C6)
- (?$(G'7(B . #xC6C7)
- (?$(G':(B . #xC6C8)
- (?$(G'<(B . #xC6C9)
- (?$(G'B(B . #xC6CA)
- (?$(G'G(B . #xC6CB)
- (?$(G'N(B . #xC6CC)
- (?$(G'S(B . #xC6CD)
- (?$(G'T(B . #xC6CE)
- (?$(G'U(B . #xC6CF)
- (?$(G'Y(B . #xC6D0)
- (?$(G'Z(B . #xC6D1)
- (?$(G'a(B . #xC6D2)
- (?$(G'f(B . #xC6D3)
- (?$(G()(B . #xC6D4)
- (?$(G(*(B . #xC6D5)
- (?$(G(c(B . #xC6D6)
- (?$(G(l(B . #xC6D7)
- ;; Diacritical Marks
- ; ((japanese-jisx0208 . #x212F) . (#xC6D8 . #xC6D9))
- ;; Japanese Kana Supplement
- ; ((japanese-jisx0208 . #x2133) . (#xC6DA . #xC6E3))
- ;; Japanese Hiragana
- ; ((japanese-jisx0208 . #x2421) . (#xC6E7 . #xC77A))
- ;; Japanese Katakana
- ; ((japanese-jisx0208 . #x2521) . (#xC77B . #xC7F2))
- ;; Cyrillic Characters
- ; ((japanese-jisx0208 . #x2721) . (#xC7F3 . #xC854))
- ; ((japanese-jisx0208 . #x2751) . (#xC855 . #xC875))
- ;; Special Chinese Characters
- (?$(J!#(B . #xC879)
- (?$(J!$(B . #xC87B)
- (?$(J!*(B . #xC87D)
- (?$(J!R(B . #xC8A2)
-
- ;; JIS X 0208 NOT SIGN (cf. U+00AC)
- ; (?$B"L(B . #xC8CD)
- ;; JIS X 0212 BROKEN BAR (cf. U+00A6)
- ; (?$(D"C(B . #xC8CE)
-
- ;; GB 2312 characters
- ; (?$A!d(B . #xC8CF)
- ; (?$A!e(B . #xC8D0)
- ;;;;; C8D1 - Japanese `($B3t(B)'
- ; (?$A!m(B . #xC8D2)
- ;;;;; C8D2 - Tel.
-
- ;; Level 2 Ideographs
- ((chinese-cns11643-2 . #x2121) . (#xC940 . #xC949))
- (?$(GDB(B . #xC94A);; a duplicate of #xA461
- ((chinese-cns11643-2 . #x212B) . (#xC94B . #xC96B))
- ((chinese-cns11643-2 . #x214D) . (#xC96C . #xC9BD))
- (?$(H!L(B . #xC9BE)
- ((chinese-cns11643-2 . #x217D) . (#xC9BF . #xC9EC))
- ((chinese-cns11643-2 . #x224E) . (#xC9ED . #xCAF6))
- (?$(H"M(B . #xCAF7)
- ((chinese-cns11643-2 . #x2439) . (#xCAF8 . #xD6CB))
- (?$(H>c(B . #xD6CC)
- ((chinese-cns11643-2 . #x3770) . (#xD6CD . #xD779))
- (?$(H?j(B . #xD77A)
- ((chinese-cns11643-2 . #x387E) . (#xD77B . #xDADE))
- (?$(H7o(B . #xDADF)
- ((chinese-cns11643-2 . #x3E64) . (#xDAE0 . #xDBA6))
- ((chinese-cns11643-2 . #x3F6B) . (#xDBA7 . #xDDFB))
- (?$(HAv(B . #xDDFC);; a duplicate of #xDCD1
- ((chinese-cns11643-2 . #x4424) . (#xDDFD . #xE8A2))
- ((chinese-cns11643-2 . #x554C) . (#xE8A3 . #xE975))
- ((chinese-cns11643-2 . #x5723) . (#xE976 . #xEB5A))
- ((chinese-cns11643-2 . #x5A29) . (#xEB5B . #xEBF0))
- (?$(HUK(B . #xEBF1)
- ((chinese-cns11643-2 . #x5B3F) . (#xEBF2 . #xECDD))
- (?$(HW"(B . #xECDE)
- ((chinese-cns11643-2 . #x5C6A) . (#xECDF . #xEDA9))
- ((chinese-cns11643-2 . #x5D75) . (#xEDAA . #xEEEA))
- (?$(Hd/(B . #xEEEB)
- ((chinese-cns11643-2 . #x6039) . (#xEEEC . #xF055))
- (?$(H]t(B . #xF056)
- ((chinese-cns11643-2 . #x6243) . (#xF057 . #xF0CA))
- (?$(HZ((B . #xF0CB)
- ((chinese-cns11643-2 . #x6337) . (#xF0CC . #xF162))
- ((chinese-cns11643-2 . #x6430) . (#xF163 . #xF16A))
- (?$(Hga(B . #xF16B)
- ((chinese-cns11643-2 . #x6438) . (#xF16C . #xF267))
- (?$(Hi4(B . #xF268)
- ((chinese-cns11643-2 . #x6573) . (#xF269 . #xF2C2))
- ((chinese-cns11643-2 . #x664E) . (#xF2C3 . #xF374))
- ((chinese-cns11643-2 . #x6762) . (#xF375 . #xF465))
- ((chinese-cns11643-2 . #x6935) . (#xF466 . #xF4B4))
- (?$(HfM(B . #xF4B5)
- ((chinese-cns11643-2 . #x6962) . (#xF4B6 . #xF4FC))
- ((chinese-cns11643-2 . #x6A4C) . (#xF4FD . #xF662))
- (?$(HjK(B . #xF663)
- ((chinese-cns11643-2 . #x6C52) . (#xF664 . #xF976))
- ((chinese-cns11643-2 . #x7167) . (#xF977 . #xF9C3))
- (?$(Hqf(B . #xF9C4)
- (?$(Hr4(B . #xF9C5)
- (?$(Hr@(B . #xF9C6)
- ((chinese-cns11643-2 . #x7235) . (#xF9C7 . #xF9D1))
- ((chinese-cns11643-2 . #x7241) . (#xF9D2 . #xF9D5))
-
- ;; Additional Ideographs
- (?$(IC7(B . #xF9D6)
- (?$(IOP(B . #xF9D7)
- (?$(IDN(B . #xF9D8)
- (?$(IPJ(B . #xF9D9)
- (?$(I,](B . #xF9DA)
- (?$(I=~(B . #xF9DB)
- (?$(IK\(B . #xF9DC)
- )
- ))
-)
+;;;###autoload
+(defun post-read-decode-hz (len)
+ (let ((pos (point))
+ (buffer-modified-p (buffer-modified-p))
+ last-coding-system-used)
+ (prog1
+ (decode-hz-region pos (+ pos len))
+ (set-buffer-modified-p buffer-modified-p))))
+;;;###autoload
+(defun pre-write-encode-hz (from to)
+ (let ((buf (current-buffer)))
+ (set-buffer (generate-new-buffer " *temp*"))
+ (if (stringp from)
+ (insert from)
+ (insert-buffer-substring buf from to))
+ (let (last-coding-system-used)
+ (encode-hz-region 1 (point-max)))
+ nil))
;;
(provide 'china-util)
diff --git a/lisp/language/chinese.el b/lisp/language/chinese.el
index ee1709fcc18..aaed3808a65 100644
--- a/lisp/language/chinese.el
+++ b/lisp/language/chinese.el
@@ -6,6 +6,9 @@
;; 2005, 2006
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
+;; Copyright (C) 2003
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H13PRO009
;; Keywords: multilingual, Chinese
@@ -37,47 +40,53 @@
;;; Chinese (general)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(make-coding-system
- 'iso-2022-cn 2 ?C
- "ISO 2022 based 7bit encoding for Chinese GB and CNS (MIME:ISO-2022-CN)."
- '(ascii
- (nil chinese-gb2312 chinese-cns11643-1)
- (nil chinese-cns11643-2)
- nil
- nil ascii-eol ascii-cntl seven locking-shift single-shift nil nil nil
- init-bol)
- '((safe-charsets ascii chinese-gb2312 chinese-cns11643-1 chinese-cns11643-2)
- (mime-charset . iso-2022-cn)))
+
+(define-coding-system 'iso-2022-cn
+ "ISO 2022 based 7bit encoding for Chinese GB and CNS (MIME:ISO-2022-CN)."
+ :coding-type 'iso-2022
+ :mnemonic ?C
+ :charset-list '(ascii chinese-gb2312 chinese-cns11643-1 chinese-cns11643-2)
+ :designation [ascii
+ (nil chinese-gb2312 chinese-cns11643-1)
+ (nil chinese-cns11643-2)
+ nil]
+ :flags '(ascii-at-eol ascii-at-cntl 7-bit
+ designation locking-shift single-shift init-at-bol)
+ :mime-charset 'iso-2022-cn
+ :suitable-for-keyboard t)
(define-coding-system-alias 'chinese-iso-7bit 'iso-2022-cn)
-(make-coding-system
- 'iso-2022-cn-ext 2 ?C
- "ISO 2022 based 7bit encoding for Chinese GB and CNS (MIME:ISO-2022-CN-EXT)."
- '(ascii
- (nil chinese-gb2312 chinese-cns11643-1)
- (nil chinese-cns11643-2)
- (nil chinese-cns11643-3 chinese-cns11643-4 chinese-cns11643-5
- chinese-cns11643-6 chinese-cns11643-7)
- nil ascii-eol ascii-cntl seven locking-shift single-shift nil nil nil
- init-bol)
- '((safe-charsets ascii chinese-gb2312 chinese-cns11643-1 chinese-cns11643-2
- chinese-cns11643-3 chinese-cns11643-4 chinese-cns11643-5
- chinese-cns11643-6 chinese-cns11643-7)
- (mime-charset . iso-2022-cn-ext)))
+(define-coding-system 'iso-2022-cn-ext
+ "ISO 2022 based 7bit encoding for Chinese GB and CNS (MIME:ISO-2022-CN-EXT)."
+ :coding-type 'iso-2022
+ :mnemonic ?C
+ :charset-list '(ascii
+ chinese-gb2312 chinese-cns11643-1
+ chinese-cns11643-2 chinese-cns11643-3 chinese-cns11643-4
+ chinese-cns11643-5 chinese-cns11643-6 chinese-cns11643-7)
+ :designation '[ascii
+ (nil chinese-gb2312 chinese-cns11643-1)
+ (nil chinese-cns11643-2)
+ (nil chinese-cns11643-3 chinese-cns11643-4 chinese-cns11643-5
+ chinese-cns11643-6 chinese-cns11643-7)]
+ :flags '(ascii-at-eol ascii-at-cntl 7-bit
+ designation locking-shift single-shift init-at-bol)
+ :mime-charset 'iso-2022-cn-ext
+ :suitable-for-keyboard t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Chinese GB2312 (simplified)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(make-coding-system
- 'chinese-iso-8bit 2 ?c
- "ISO 2022 based EUC encoding for Chinese GB2312 (MIME:GB2312)."
- '(ascii chinese-gb2312 nil nil
- nil ascii-eol ascii-cntl nil nil nil nil)
- '((safe-charsets ascii chinese-gb2312)
- (mime-charset . gb2312)))
+(define-coding-system 'chinese-iso-8bit
+ "ISO 2022 based EUC encoding for Chinese GB2312 (MIME:GB2312)."
+ :coding-type 'iso-2022
+ :mnemonic ?c
+ :charset-list '(ascii chinese-gb2312)
+ :designation [ascii chinese-gb2312 nil nil]
+ :mime-charset 'gb2312)
(define-coding-system-alias 'cn-gb-2312 'chinese-iso-8bit)
(define-coding-system-alias 'euc-china 'chinese-iso-8bit)
@@ -86,36 +95,18 @@
(define-coding-system-alias 'gb2312 'chinese-iso-8bit)
(define-coding-system-alias 'cp936 'chinese-iso-8bit)
-(make-coding-system
- 'chinese-hz 0 ?z
- "Hz/ZW 7-bit encoding for Chinese GB2312 (MIME:HZ-GB-2312)."
- nil
- '((safe-charsets ascii chinese-gb2312)
- (mime-charset . hz-gb-2312)
- (post-read-conversion . post-read-decode-hz)
- (pre-write-conversion . pre-write-encode-hz)))
+(define-coding-system 'chinese-hz
+ "Hz/ZW 7-bit encoding for Chinese GB2312 (MIME:HZ-GB-2312)."
+ :coding-type 'utf-8
+ :mnemonic ?z
+ :charset-list '(ascii chinese-gb2312)
+ :mime-charset 'hz-gb-2312
+ :post-read-conversion 'post-read-decode-hz
+ :pre-write-conversion 'pre-write-encode-hz)
(define-coding-system-alias 'hz-gb-2312 'chinese-hz)
(define-coding-system-alias 'hz 'chinese-hz)
-(defun post-read-decode-hz (len)
- (let ((pos (point))
- (buffer-modified-p (buffer-modified-p))
- last-coding-system-used)
- (prog1
- (decode-hz-region pos (+ pos len))
- (set-buffer-modified-p buffer-modified-p))))
-
-(defun pre-write-encode-hz (from to)
- (let ((buf (current-buffer)))
- (set-buffer (generate-new-buffer " *temp*"))
- (if (stringp from)
- (insert from)
- (insert-buffer-substring buf from to))
- (let (last-coding-system-used)
- (encode-hz-region 1 (point-max)))
- nil))
-
(set-language-info-alist
"Chinese-GB" '((charset chinese-gb2312 chinese-sisheng)
(coding-system chinese-iso-8bit iso-2022-cn chinese-hz)
@@ -131,190 +122,62 @@
;; Chinese BIG5 (traditional)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(make-coding-system
- 'chinese-big5 3 ?B
- "BIG5 8-bit encoding for Chinese (MIME:Big5)."
- nil
- '((safe-charsets ascii chinese-big5-1 chinese-big5-2)
- (mime-charset . big5)
- (charset-origin-alist (chinese-big5-1 "BIG5" encode-big5-char)
- (chinese-big5-2 "BIG5" encode-big5-char))))
+(define-coding-system 'chinese-big5
+ "BIG5 8-bit encoding for Chinese (MIME:Big5)"
+ :coding-type 'charset
+ :mnemonic ?B
+ :charset-list '(ascii big5)
+ :mime-charset 'big5)
(define-coding-system-alias 'big5 'chinese-big5)
(define-coding-system-alias 'cn-big5 'chinese-big5)
(define-coding-system-alias 'cp950 'chinese-big5)
-;; Big5 font requires special encoding.
-(define-ccl-program ccl-encode-big5-font
- `(0
- ;; In: R0:chinese-big5-1 or chinese-big5-2
- ;; R1:position code 1
- ;; R2:position code 2
- ;; Out: R1:font code point 1
- ;; R2:font code point 2
- ((r2 = ((((r1 - ?\x21) * 94) + r2) - ?\x21))
- (if (r0 == ,(charset-id 'chinese-big5-2)) (r2 += 6280))
- (r1 = ((r2 / 157) + ?\xA1))
- (r2 %= 157)
- (if (r2 < ?\x3F) (r2 += ?\x40) (r2 += ?\x62))))
- "CCL program to encode a Big5 code to code point of Big5 font.")
-
-(setq font-ccl-encoder-alist
- (cons (cons "big5" ccl-encode-big5-font) font-ccl-encoder-alist))
-
(set-language-info-alist
"Chinese-BIG5" '((charset chinese-big5-1 chinese-big5-2)
(coding-system chinese-big5 chinese-iso-7bit)
(coding-priority chinese-big5 iso-2022-cn chinese-iso-8bit)
(input-method . "chinese-py-punct-b5")
+ (ctext-non-standard-encodings "big5-0")
(features china-util)
- (sample-text . "Cantonese ($(0GnM$(B,$(0N]0*Hd(B) $(0*/=((B, $(0+$)p(B")
+ (sample-text . "Cantonese ($(Gemk#(B,$(Gl]N)fc(B) $ATg3?(B, $ADc:C(B")
(documentation . "Support for Chinese Big5 character set.")
(tutorial . "TUTORIAL.zh"))
'("Chinese"))
+(define-coding-system 'chinese-big5-hkscs
+ "BIG5-HKSCS 8-bit encoding for Chinese, Hong Kong supplement (MIME:Big5-HKSCS)"
+ :coding-type 'charset
+ :mnemonic ?B
+ :charset-list '(ascii big5-hkscs)
+ :mime-charset 'big5-hkscs)
+(define-coding-system-alias 'big5-hkscs 'chinese-big5-hkscs)
+(define-coding-system-alias 'cn-big5-hkscs 'chinese-big5-hkscs)
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Chinese CNS11643 (traditional)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-(defvar big5-to-cns (make-translation-table)
- "Translation table for encoding to `euc-tw'.")
-;; Could have been done by china-util loaded before.
-(unless (get 'big5-to-cns 'translation-table)
- (define-translation-table 'big5-to-cns big5-to-cns))
-
-(define-ccl-program ccl-decode-euc-tw
- ;; CNS plane 1 needs either two or four bytes in EUC-TW encoding;
- ;; CNS planes 2 to 7 always need four bytes. In internal encoding of
- ;; Emacs, CNS planes 1 and 2 need three bytes, and planes 3 to 7 need
- ;; four bytes. Thus a buffer magnification value of 2 (for both
- ;; encoding and decoding) is sufficient.
- `(2
- ;; we don't have enough registers to hold all charset-ids
- ((r4 = ,(charset-id 'chinese-cns11643-1))
- (r5 = ,(charset-id 'chinese-cns11643-2))
- (r6 = ,(charset-id 'chinese-cns11643-3))
- (loop
- (read-if (r0 < #x80)
- ;; ASCII
- (write-repeat r0)
- ;; not ASCII
- (if (r0 == #x8E)
- ;; single shift
- (read-if (r1 < #xA1)
- ;; invalid byte
- ((write r0)
- (write-repeat r1))
- (if (r1 > #xA7)
- ;; invalid plane
- ((write r0)
- (write-repeat r1))
- ;; OK, we have a plane
- (read-if (r2 < #xA1)
- ;; invalid first byte
- ((write r0 r1)
- (write-repeat r2))
- (read-if (r3 < #xA1)
- ;; invalid second byte
- ((write r0 r1 r2)
- (write-repeat r3))
- ;; CNS 1-7, finally
- ((branch (r1 - #xA1)
- (r1 = r4)
- (r1 = r5)
- (r1 = r6)
- (r1 = ,(charset-id 'chinese-cns11643-4))
- (r1 = ,(charset-id 'chinese-cns11643-5))
- (r1 = ,(charset-id 'chinese-cns11643-6))
- (r1 = ,(charset-id 'chinese-cns11643-7)))
- (r2 = ((((r2 - #x80) << 7) + r3) - #x80))
- (write-multibyte-character r1 r2)
- (repeat))))))
- ;; standard EUC
- (if (r0 < #xA1)
- ;; invalid first byte
- (write-repeat r0)
- (read-if (r1 < #xA1)
- ;; invalid second byte
- ((write r0)
- (write-repeat r1))
- ;; CNS 1, finally
- ((r1 = ((((r0 - #x80) << 7) + r1) - #x80))
- (write-multibyte-character r4 r1)
- (repeat)))))))))
- "CCL program to decode EUC-TW encoding."
-)
-
-(define-ccl-program ccl-encode-euc-tw
- `(2
- ;; we don't have enough registers to hold all charset-ids
- ((r2 = ,(charset-id 'ascii))
- (r3 = ,(charset-id 'chinese-big5-1))
- (r4 = ,(charset-id 'chinese-big5-2))
- (r5 = ,(charset-id 'chinese-cns11643-1))
- (r6 = ,(charset-id 'chinese-cns11643-2))
- (loop
- (read-multibyte-character r0 r1)
- (if (r0 == r2)
- (write-repeat r1)
- (;; Big 5 encoded characters are first translated to CNS
- (if (r0 == r3)
- (translate-character big5-to-cns r0 r1)
- (if (r0 == r4)
- (translate-character big5-to-cns r0 r1)))
- (if (r0 == r5)
- (r0 = #xA1)
- (if (r0 == r6)
- (r0 = #xA2)
- (if (r0 == ,(charset-id 'chinese-cns11643-3))
- (r0 = #xA3)
- (if (r0 == ,(charset-id 'chinese-cns11643-4))
- (r0 = #xA4)
- (if (r0 == ,(charset-id 'chinese-cns11643-5))
- (r0 = #xA5)
- (if (r0 == ,(charset-id 'chinese-cns11643-6))
- (r0 = #xA6)
- (if (r0 == ,(charset-id 'chinese-cns11643-7))
- (r0 = #xA7)
- ;; not CNS. We use a dummy character which
- ;; can't occur in EUC-TW encoding to indicate
- ;; this.
- (write-repeat #xFF))))))))))
- (if (r0 != #xA1)
- ;; single shift and CNS plane
- ((write #x8E)
- (write r0)))
- (write ((r1 >> 7) + #x80))
- (write ((r1 % #x80) + #x80))
- (repeat))))
- "CCL program to encode EUC-TW encoding."
-)
-
-(defun euc-tw-pre-write-conversion (beg end)
- "Semi-dummy pre-write function effectively to autoload china-util."
- ;; Ensure translation table is loaded.
- (require 'china-util)
- ;; Don't do this again.
- (coding-system-put 'euc-tw 'pre-write-conversion nil)
- nil)
-
-(make-coding-system
- 'euc-tw 4 ?Z
- "ISO 2022 based EUC encoding for Chinese CNS11643.
-Big5 encoding is accepted for input also (which is then converted to CNS)."
- '(ccl-decode-euc-tw . ccl-encode-euc-tw)
- '((safe-charsets ascii
- chinese-big5-1
- chinese-big5-2
- chinese-cns11643-1
- chinese-cns11643-2
- chinese-cns11643-3
- chinese-cns11643-4
- chinese-cns11643-5
- chinese-cns11643-6
- chinese-cns11643-7)
- (valid-codes (0 . 255))
- (pre-write-conversion . euc-tw-pre-write-conversion)))
+(define-coding-system 'euc-tw
+ "ISO 2022 based EUC encoding for Chinese CNS11643."
+ :coding-type 'iso-2022
+ :mnemonic ?Z
+ :charset-list '(ascii
+ chinese-cns11643-1
+ chinese-cns11643-2
+ chinese-cns11643-3
+ chinese-cns11643-4
+ chinese-cns11643-5
+ chinese-cns11643-6
+ chinese-cns11643-7)
+ :designation [ascii chinese-cns11643-1 (chinese-cns11643-1
+ chinese-cns11643-2
+ chinese-cns11643-3
+ chinese-cns11643-4
+ chinese-cns11643-5
+ chinese-cns11643-6
+ chinese-cns11643-7) nil]
+ :mime-charset 'euc-tw)
(define-coding-system-alias 'euc-taiwan 'euc-tw)
@@ -328,6 +191,7 @@ Big5 encoding is accepted for input also (which is then converted to CNS)."
chinese-iso-8bit)
(features china-util)
(input-method . "chinese-cns-quick")
+ ;; Fixme: presumably it won't accept big5 now.
(documentation . "\
Support for Chinese CNS character sets. Note that the EUC-TW coding system
accepts Big5 for input also (which is then converted to CNS)."))
@@ -349,6 +213,60 @@ the EUC-TW coding system accepts Big5 for input also (which is then
converted to CNS)."))
'("Chinese"))
+
+;;; Chinese GBK
+
+(define-coding-system 'chinese-gbk
+ "GBK encoding for Chinese (MIME:GBK)."
+ :coding-type 'charset
+ :mnemonic ?c
+ :charset-list '(ascii chinese-gbk)
+ :mime-charset 'gbk)
+(define-coding-system-alias 'gbk 'chinese-gbk)
+(define-coding-system-alias 'cp936 'chinese-gbk)
+(define-coding-system-alias 'windows-936 'chinese-gbk)
+
+(set-language-info-alist
+ "Chinese-GBK" '((charset chinese-gbk)
+ (coding-system chinese-gbk)
+ (coding-priority gbk iso-2022-cn chinese-big5
+ chinese-iso-8bit) ; fixme?
+ (ctext-non-standard-encodings "gbk-0")
+ (input-method . "chinese-py-punct") ; fixme?
+ (sample-text . "Chinese ($BCfJ8(B,$BIaDL$A;0(B,$A::So(B) $(D95$B9%(B")
+ (features china-util)
+ (documentation . "Support for Chinese GBK character set.")
+ (tutorial . "TUTORIAL.cn"))
+ '("Chinese"))
+
+;;; Chinese GB18030
+
+(define-coding-system 'chinese-gb18030
+ "GB18030 encoding for Chinese (MIME:GB18030)."
+ :coding-type 'charset
+ :mnemonic ?c
+ :charset-list '(ascii gb18030-2-byte
+ gb18030-4-byte-bmp gb18030-4-byte-smp
+ gb18030-4-byte-ext-1 gb18030-4-byte-ext-2)
+ :mime-charset 'gb18030)
+
+(define-coding-system-alias 'gb18030 'chinese-gb18030)
+
+(set-language-info-alist
+ "Chinese-GB18030" '((charset gb18030)
+ (coding-system chinese-gb18030)
+ (coding-priority gb18030 gbk iso-2022-cn chinese-big5
+ chinese-iso-8bit) ; fixme?
+ (input-method . "chinese-py-punct") ; fixme?
+ (sample-text . "Chinese ($BCfJ8(B,$BIaDL$A;0(B,$A::So(B) $(D0_$B9%(B")
+ (features china-util)
+ (documentation
+ . "Support for Chinese GB18030 character set.")
+ (tutorial . "TUTORIAL.cn"))
+ '("Chinese"))
+
+;; Fixme: add HKSCS
+
(provide 'chinese)
;;; arch-tag: b82fcf7a-84f6-4e0b-b38c-1742dac0e09f
diff --git a/lisp/language/cyril-util.el b/lisp/language/cyril-util.el
index 321414242f8..1203301708e 100644
--- a/lisp/language/cyril-util.el
+++ b/lisp/language/cyril-util.el
@@ -31,19 +31,12 @@
;;;###autoload
(defun cyrillic-encode-koi8-r-char (char)
"Return KOI8-R external character code of CHAR if appropriate."
- (aref (char-table-extra-slot
- (get 'cyrillic-koi8-r-nonascii-translation-table 'translation-table)
- 0)
- char))
+ (encode-char char 'koi8-r))
;;;###autoload
(defun cyrillic-encode-alternativnyj-char (char)
"Return ALTERNATIVNYJ external character code of CHAR if appropriate."
- (aref (char-table-extra-slot
- (get 'cyrillic-alternativnyj-nonascii-translation-table
- 'translation-table)
- 0)
- char))
+ (encode-char char 'alternativnyj))
;; Display
@@ -177,117 +170,13 @@ If the argument is nil, we return the display table to its standard state."
(aset standard-display-table ?,L*(B [?N ?j])
(aset standard-display-table ?,L/(B [?D ?j])
- ;; Unicode version:
- (aset standard-display-table ?$,1(P(B [?a])
- (aset standard-display-table ?$,1(Q(B [?b])
- (aset standard-display-table ?$,1(R(B [?v])
- (aset standard-display-table ?$,1(S(B [?g])
- (aset standard-display-table ?$,1(T(B [?d])
- (aset standard-display-table ?$,1(U(B [?e])
- (aset standard-display-table ?$,1(q(B [?y ?o])
- (aset standard-display-table ?$,1(V(B [?z ?h])
- (aset standard-display-table ?$,1(W(B [?z])
- (aset standard-display-table ?$,1(X(B [?i])
- (aset standard-display-table ?$,1(Y(B [?j])
- (aset standard-display-table ?$,1(Z(B [?k])
- (aset standard-display-table ?$,1([(B [?l])
- (aset standard-display-table ?$,1(\(B [?m])
- (aset standard-display-table ?$,1(](B [?n])
- (aset standard-display-table ?$,1(^(B [?o])
- (aset standard-display-table ?$,1(_(B [?p])
- (aset standard-display-table ?$,1(`(B [?r])
- (aset standard-display-table ?$,1(a(B [?s])
- (aset standard-display-table ?$,1(b(B [?t])
- (aset standard-display-table ?$,1(c(B [?u])
- (aset standard-display-table ?$,1(d(B [?f])
- (aset standard-display-table ?$,1(e(B [?k ?h])
- (aset standard-display-table ?$,1(f(B [?t ?s])
- (aset standard-display-table ?$,1(g(B [?c ?h])
- (aset standard-display-table ?$,1(h(B [?s ?h])
- (aset standard-display-table ?$,1(i(B [?s ?c ?h])
- (aset standard-display-table ?$,1(j(B [?~])
- (aset standard-display-table ?$,1(k(B [?y])
- (aset standard-display-table ?$,1(l(B [?'])
- (aset standard-display-table ?$,1(m(B [?e ?'])
- (aset standard-display-table ?$,1(n(B [?y ?u])
- (aset standard-display-table ?$,1(o(B [?y ?a])
-
- (aset standard-display-table ?$,1(0(B [?A])
- (aset standard-display-table ?$,1(1(B [?B])
- (aset standard-display-table ?$,1(2(B [?V])
- (aset standard-display-table ?$,1(3(B [?G])
- (aset standard-display-table ?$,1(4(B [?D])
- (aset standard-display-table ?$,1(5(B [?E])
- (aset standard-display-table ?$,1(!(B [?Y ?o])
- (aset standard-display-table ?$,1(6(B [?Z ?h])
- (aset standard-display-table ?$,1(7(B [?Z])
- (aset standard-display-table ?$,1(8(B [?I])
- (aset standard-display-table ?$,1(9(B [?J])
- (aset standard-display-table ?$,1(:(B [?K])
- (aset standard-display-table ?$,1(;(B [?L])
- (aset standard-display-table ?$,1(<(B [?M])
- (aset standard-display-table ?$,1(=(B [?N])
- (aset standard-display-table ?$,1(>(B [?O])
- (aset standard-display-table ?$,1(?(B [?P])
- (aset standard-display-table ?$,1(@(B [?R])
- (aset standard-display-table ?$,1(A(B [?S])
- (aset standard-display-table ?$,1(B(B [?T])
- (aset standard-display-table ?$,1(C(B [?U])
- (aset standard-display-table ?$,1(D(B [?F])
- (aset standard-display-table ?$,1(E(B [?K ?h])
- (aset standard-display-table ?$,1(F(B [?T ?s])
- (aset standard-display-table ?$,1(G(B [?C ?h])
- (aset standard-display-table ?$,1(H(B [?S ?h])
- (aset standard-display-table ?$,1(I(B [?S ?c ?h])
- (aset standard-display-table ?$,1(J(B [?~])
- (aset standard-display-table ?$,1(K(B [?Y])
- (aset standard-display-table ?$,1(L(B [?'])
- (aset standard-display-table ?$,1(M(B [?E ?'])
- (aset standard-display-table ?$,1(N(B [?Y ?u])
- (aset standard-display-table ?$,1(O(B [?Y ?a])
-
- (aset standard-display-table ?$,1(t(B [?i ?e])
- (aset standard-display-table ?$,1(w(B [?i])
- (aset standard-display-table ?$,1(~(B [?u])
- (aset standard-display-table ?$,1(r(B [?d ?j])
- (aset standard-display-table ?$,1({(B [?c ?h ?j])
- (aset standard-display-table ?$,1(s(B [?g ?j])
- (aset standard-display-table ?$,1(u(B [?s])
- (aset standard-display-table ?$,1(|(B [?k])
- (aset standard-display-table ?$,1(v(B [?i])
- (aset standard-display-table ?$,1(x(B [?j])
- (aset standard-display-table ?$,1(y(B [?l ?j])
- (aset standard-display-table ?$,1(z(B [?n ?j])
- (aset standard-display-table ?$,1((B [?d ?z])
-
- (aset standard-display-table ?$,1($(B [?Y ?e])
- (aset standard-display-table ?$,1('(B [?Y ?i])
- (aset standard-display-table ?$,1(.(B [?U])
- (aset standard-display-table ?$,1("(B [?D ?j])
- (aset standard-display-table ?$,1(+(B [?C ?h ?j])
- (aset standard-display-table ?$,1(#(B [?G ?j])
- (aset standard-display-table ?$,1(%(B [?S])
- (aset standard-display-table ?$,1(,(B [?K])
- (aset standard-display-table ?$,1(&(B [?I])
- (aset standard-display-table ?$,1(((B [?J])
- (aset standard-display-table ?$,1()(B [?L ?j])
- (aset standard-display-table ?$,1(*(B [?N ?j])
- (aset standard-display-table ?$,1(/(B [?D ?j])
-
(when (equal cyrillic-language "Bulgarian")
(aset standard-display-table ?,Li(B [?s ?h ?t])
(aset standard-display-table ?,LI(B [?S ?h ?t])
(aset standard-display-table ?,Ln(B [?i ?u])
(aset standard-display-table ?,LN(B [?I ?u])
(aset standard-display-table ?,Lo(B [?i ?a])
- (aset standard-display-table ?,LO(B [?I ?a])
- ;; Unicode version:
- (aset standard-display-table ?$,1(i(B [?s ?h ?t])
- (aset standard-display-table ?$,1(I(B [?S ?h ?t])
- (aset standard-display-table ?$,1(n(B [?i ?u])
- (aset standard-display-table ?$,1(N(B [?I ?u])
- (aset standard-display-table ?$,1(o(B [?i ?a])
- (aset standard-display-table ?$,1(O(B [?I ?a]))
+ (aset standard-display-table ?,LO(B [?I ?a]))
(when (equal cyrillic-language "Ukrainian") ; based on the official
; transliteration table
@@ -296,14 +185,7 @@ If the argument is nil, we return the display table to its standard state."
(aset standard-display-table ?,LY(B [?i])
(aset standard-display-table ?,L9(B [?Y])
(aset standard-display-table ?,Ln(B [?i ?u])
- (aset standard-display-table ?,Lo(B [?i ?a])
- ;; Unicode version:
- (aset standard-display-table ?$,1(X(B [?y])
- (aset standard-display-table ?$,1(8(B [?Y])
- (aset standard-display-table ?$,1(Y(B [?i])
- (aset standard-display-table ?$,1(9(B [?Y])
- (aset standard-display-table ?$,1(n(B [?i ?u])
- (aset standard-display-table ?$,1(o(B [?i ?a]))))
+ (aset standard-display-table ?,Lo(B [?i ?a]))))
;;
(provide 'cyril-util)
diff --git a/lisp/language/cyrillic.el b/lisp/language/cyrillic.el
index 4e709cc5b63..110f07e14ea 100644
--- a/lisp/language/cyrillic.el
+++ b/lisp/language/cyrillic.el
@@ -6,6 +6,9 @@
;; 2005, 2006
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
+;; Copyright (C) 2003
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H13PRO009
;; Author: Kenichi Handa <handa@etl.go.jp>
;; Keywords: multilingual, Cyrillic, i18n
@@ -57,22 +60,21 @@
;; ISO-8859-5 stuff
-(make-coding-system
- 'cyrillic-iso-8bit 2 ?5
- "ISO 2022 based 8-bit encoding for Cyrillic script (MIME:ISO-8859-5)."
- '(ascii cyrillic-iso8859-5 nil nil
- nil nil nil nil nil nil nil nil nil nil nil t)
- '((safe-charsets ascii cyrillic-iso8859-5)
- (mime-charset . iso-8859-5)))
+(define-coding-system 'cyrillic-iso-8bit
+ "ISO 2022 based 8-bit encoding for Cyrillic script (MIME:ISO-8859-5)."
+ :coding-type 'charset
+ :mnemonic ?5
+ :charset-list '(iso-8859-5)
+ :mime-charset 'iso-8859-5)
(define-coding-system-alias 'iso-8859-5 'cyrillic-iso-8bit)
(set-language-info-alist
- "Cyrillic-ISO" '((charset cyrillic-iso8859-5)
+ "Cyrillic-ISO" '((charset iso-8859-5)
(coding-system cyrillic-iso-8bit)
(coding-priority cyrillic-iso-8bit)
(input-method . "cyrillic-yawerty") ; fixme
- (nonascii-translation . cyrillic-iso8859-5)
+ (nonascii-translation . iso-8859-5)
(unibyte-display . cyrillic-iso-8bit)
(features cyril-util)
(sample-text . "Russian (,L@caaZXY(B) ,L7T`PRabRcYbU(B!")
@@ -81,155 +83,26 @@
;; KOI-8R stuff
-;; The mule-unicode portion of this is from
-;; http://www.unicode.org/Public/MAPPINGS/VENDORS/MISC/KOI8-R.TXT,
-;; which references RFC 1489.
-(defvar cyrillic-koi8-r-decode-table
- [
- 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
- 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
- 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
- 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
- 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
- 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
- 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
- ;; 8859-5 plus Unicode
- ?$,2 (B ?$,2 "(B ?$,2 ,(B ?$,2 0(B ?$,2 4(B ?$,2 8(B ?$,2 <(B ?$,2 D(B ?$,2 L(B ?$,2 T(B ?$,2 \(B ?$,2!@(B ?$,2!D(B ?$,2!H(B ?$,2!L(B ?$,2!P(B
- ?$,2!Q(B ?$,2!R(B ?$,2!S(B ?$,1{ (B ?$,2!`(B ?$,1s"(B ?$,1x:(B ?$,1xh(B ?$,1y$(B ?$,1y%(B ?,L (B ?$,1{!(B ?,A0(B ?,A2(B ?,A7(B ?,Aw(B
- ?$,2 p(B ?$,2 q(B ?$,2 r(B ?,Lq(B ?$,2 s(B ?$,2 t(B ?$,2 u(B ?$,2 v(B ?$,2 w(B ?$,2 x(B ?$,2 y(B ?$,2 z(B ?$,2 {(B ?$,2 |(B ?$,2 }(B ?$,2 ~(B
- ?$,2 (B ?$,2! (B ?$,2!!(B ?,L!(B ?$,2!"(B ?$,2!#(B ?$,2!$(B ?$,2!%(B ?$,2!&(B ?$,2!'(B ?$,2!((B ?$,2!)(B ?$,2!*(B ?$,2!+(B ?$,2!,(B ?,A)(B
- ?,Ln(B ?,LP(B ?,LQ(B ?,Lf(B ?,LT(B ?,LU(B ?,Ld(B ?,LS(B ?,Le(B ?,LX(B ?,LY(B ?,LZ(B ?,L[(B ?,L\(B ?,L](B ?,L^(B
- ?,L_(B ?,Lo(B ?,L`(B ?,La(B ?,Lb(B ?,Lc(B ?,LV(B ?,LR(B ?,Ll(B ?,Lk(B ?,LW(B ?,Lh(B ?,Lm(B ?,Li(B ?,Lg(B ?,Lj(B
- ?,LN(B ?,L0(B ?,L1(B ?,LF(B ?,L4(B ?,L5(B ?,LD(B ?,L3(B ?,LE(B ?,L8(B ?,L9(B ?,L:(B ?,L;(B ?,L<(B ?,L=(B ?,L>(B
- ?,L?(B ?,LO(B ?,L@(B ?,LA(B ?,LB(B ?,LC(B ?,L6(B ?,L2(B ?,LL(B ?,LK(B ?,L7(B ?,LH(B ?,LM(B ?,LI(B ?,LG(B ?,LJ(B
- ;; All Unicode:
-;; ?$,2 (B ?$,2 "(B ?$,2 ,(B ?$,2 0(B ?$,2 4(B ?$,2 8(B ?$,2 <(B ?$,2 D(B ?$,2 L(B ?$,2 T(B ?$,2 \(B ?$,2!@(B ?$,2!D(B ?$,2!H(B ?$,2!L(B ?$,2!P(B
-;; ?$,2!Q(B ?$,2!R(B ?$,2!S(B ?$,1{ (B ?$,2!`(B ?$,1s"(B ?$,1x:(B ?$,1xh(B ?$,1y$(B ?$,1y%(B ?,A (B ?$,1{!(B ?,A0(B ?,A2(B ?,A7(B ?,Aw(B
-;; ?$,2 p(B ?$,2 q(B ?$,2 r(B ?$,1(q(B ?$,2 s(B ?$,2 t(B ?$,2 u(B ?$,2 v(B ?$,2 w(B ?$,2 x(B ?$,2 y(B ?$,2 z(B ?$,2 {(B ?$,2 |(B ?$,2 }(B ?$,2 ~(B
-;; ?$,2 (B ?$,2! (B ?$,2!!(B ?$,1(!(B ?$,2!"(B ?$,2!#(B ?$,2!$(B ?$,2!%(B ?$,2!&(B ?$,2!'(B ?$,2!((B ?$,2!)(B ?$,2!*(B ?$,2!+(B ?$,2!,(B ?,A)(B
-;; ?$,1(n(B ?$,1(P(B ?$,1(Q(B ?$,1(f(B ?$,1(T(B ?$,1(U(B ?$,1(d(B ?$,1(S(B ?$,1(e(B ?$,1(X(B ?$,1(Y(B ?$,1(Z(B ?$,1([(B ?$,1(\(B ?$,1(](B ?$,1(^(B
-;; ?$,1(_(B ?$,1(o(B ?$,1(`(B ?$,1(a(B ?$,1(b(B ?$,1(c(B ?$,1(V(B ?$,1(R(B ?$,1(l(B ?$,1(k(B ?$,1(W(B ?$,1(h(B ?$,1(m(B ?$,1(i(B ?$,1(g(B ?$,1(j(B
-;; ?$,1(N(B ?$,1(0(B ?$,1(1(B ?$,1(F(B ?$,1(4(B ?$,1(5(B ?$,1(D(B ?$,1(3(B ?$,1(E(B ?$,1(8(B ?$,1(9(B ?$,1(:(B ?$,1(;(B ?$,1(<(B ?$,1(=(B ?$,1(>(B
-;; ?$,1(?(B ?$,1(O(B ?$,1(@(B ?$,1(A(B ?$,1(B(B ?$,1(C(B ?$,1(6(B ?$,1(2(B ?$,1(L(B ?$,1(K(B ?$,1(7(B ?$,1(H(B ?$,1(M(B ?$,1(I(B ?$,1(G(B ?$,1(J(B
- ]
- "Cyrillic KOI8-R decoding table.")
-
-(let ((table (make-translation-table-from-vector
- cyrillic-koi8-r-decode-table)))
- (define-translation-table 'cyrillic-koi8-r-nonascii-translation-table table)
- (define-translation-table 'cyrillic-koi8-r-encode-table
- (char-table-extra-slot table 0)))
-
-;; No point in keeping it around. (It can't be let-bound, since it's
-;; needed for macro expansion.)
-(makunbound 'cyrillic-koi8-r-decode-table)
-
-(define-ccl-program ccl-decode-koi8
- `(4
- ((loop
- (r0 = 0)
- (read r1)
- (if (r1 < 128)
- (write-repeat r1)
- ((translate-character cyrillic-koi8-r-nonascii-translation-table r0 r1)
- (translate-character ucs-translation-table-for-decode r0 r1)
- (write-multibyte-character r0 r1)
- (repeat))))))
- "CCL program to decode KOI8-R.")
-
-(define-ccl-program ccl-encode-koi8
- `(1
- ((loop
- (read-multibyte-character r0 r1)
- (translate-character cyrillic-koi8-r-encode-table r0 r1)
- (if (r0 != ,(charset-id 'ascii))
- (if (r0 != ,(charset-id 'eight-bit-graphic))
- (if (r0 != ,(charset-id 'eight-bit-control))
- (r1 = ??))))
- (write-repeat r1))))
- "CCL program to encode KOI8-R.")
-
-(defun cyrillic-unify-encoding (table)
- "Set up equivalent characters in the encoding TABLE.
-This works whether or not the table is Unicode-based or
-8859-5-based. (Only appropriate for Cyrillic.)"
- (let ((table (get table 'translation-table)))
- (dotimes (i 96)
- (let* ((c (make-char 'cyrillic-iso8859-5 (+ i 32)))
- (u ; equivalent Unicode char
- (cond ((eq c ?,L (B) ?,A (B)
- ((eq c ?,L-(B) ?,A-(B)
- ((eq c ?,L}(B) ?,A'(B)
- (t (decode-char 'ucs (+ #x400 i)))))
- (ec (aref table c)) ; encoding of 8859-5
- (uc (aref table u))) ; encoding of Unicode
- (unless (memq c '(?,L (B ?,L-(B ?,L}(B)) ; 8859-5 exceptions
- (unless uc
- (aset table u ec))
- (unless ec
- (aset table c uc)))))))
-
-(cyrillic-unify-encoding 'cyrillic-koi8-r-encode-table)
-
-(make-coding-system
- 'cyrillic-koi8 4
- ;; We used to use ?K. It is true that ?K is more strictly correct,
- ;; but it is also used for Korean.
- ;; So people who use koi8 for languages other than Russian
- ;; will have to forgive us.
- ?R "KOI8-R 8-bit encoding for Cyrillic (MIME: KOI8-R)."
- '(ccl-decode-koi8 . ccl-encode-koi8)
- `((safe-chars . cyrillic-koi8-r-encode-table)
- (mime-charset . koi8-r)
- (valid-codes (0 . 255))
- (dependency unify-8859-on-encoding-mode unify-8859-on-decoding-mode)))
+(define-coding-system 'cyrillic-koi8
+ "KOI8 8-bit encoding for Cyrillic (MIME: KOI8-R)."
+ :coding-type 'charset
+ ;; We used to use ?K. It is true that ?K is more strictly correct,
+ ;; but it is also used for Korean. So people who use koi8 for
+ ;; languages other than Russian will have to forgive us.
+ :mnemonic ?R
+ :charset-list '(koi8)
+ :mime-charset 'koi8-r)
(define-coding-system-alias 'koi8-r 'cyrillic-koi8)
(define-coding-system-alias 'koi8 'cyrillic-koi8)
(define-coding-system-alias 'cp878 'cyrillic-koi8)
-(let ((elt `("koi8-r" koi8-r 1
- ,(get 'cyrillic-koi8-r-encode-table 'translation-table)))
- (slot (assoc "koi8-r" ctext-non-standard-encodings-alist)))
- (if slot
- (setcdr slot (cdr elt))
- (push elt ctext-non-standard-encodings-alist)))
-
-;; Allow displaying some of KOI & al with an 8859-5-encoded font. We
-;; won't bother about the exceptions when encoding the font, since
-;; NBSP will fall through below and work anyhow, and we'll have
-;; avoided setting the fontset for the other two to 8859-5 -- they're
-;; not in KOI and Alternativnyj anyhow.
-(define-ccl-program ccl-encode-8859-5-font
- `(0
- ((if (r0 == ,(charset-id 'cyrillic-iso8859-5))
- (r1 += 128)
- (if (r0 == ,(charset-id 'mule-unicode-0100-24ff))
- (r1 = (r2 + 128))))))
- "Encode ISO 8859-5 and Cyrillic Unicode chars to 8859-5 font.")
-
-(add-to-list 'font-ccl-encoder-alist '("iso8859-5" . ccl-encode-8859-5-font))
-
-;; The table is set up later to encode both Unicode and 8859-5.
-(define-ccl-program ccl-encode-koi8-font
- `(0
- (if (r2 >= 0)
- ((r1 <<= 7)
- (r1 += r2)))
- (translate-character cyrillic-koi8-r-encode-table r0 r1))
- "CCL program to encode Cyrillic chars to KOI font.")
-
-(add-to-list 'font-ccl-encoder-alist '("koi8" . ccl-encode-koi8-font))
-
(set-language-info-alist
- "Cyrillic-KOI8" `((charset cyrillic-iso8859-5)
- (nonascii-translation
- . ,(get 'cyrillic-koi8-r-nonascii-translation-table
- 'translation-table))
+ "Cyrillic-KOI8" `((charset koi8)
(coding-system cyrillic-koi8)
(coding-priority cyrillic-koi8 cyrillic-iso-8bit)
(ctext-non-standard-encodings "koi8-r")
+ (nonascii-translation . koi8)
(input-method . "russian-typewriter")
(features cyril-util)
(unibyte-display . cyrillic-koi8)
@@ -253,95 +126,18 @@ Support for Russian using koi8-r and the russian-computer input method.")
(tutorial . "TUTORIAL.ru"))
'("Cyrillic"))
-
-(defvar cyrillic-koi8-u-decode-table
- [
- 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
- 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
- 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
- 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
- 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
- 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
- 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
- ;; All Unicode:
-;; ?$,2 (B ?$,2 "(B ?$,2 ,(B ?$,2 0(B ?$,2 4(B ?$,2 8(B ?$,2 <(B ?$,2 D(B ?$,2 L(B ?$,2 T(B ?$,2 \(B ?$,2!@(B ?$,2!D(B ?$,2!H(B ?$,2!L(B ?$,2!P(B
-;; ?$,2!Q(B ?$,2!R(B ?$,2!S(B ?$,1{ (B ?$,2!`(B ?$,1x9(B ?$,1x:(B ?$,1xh(B ?$,1y$(B ?$,1y%(B ?,L (B ?$,1{!(B ?,A0(B ?,A2(B ?,A7(B ?,Aw(B
-;; ?$,2 p(B ?$,2 q(B ?$,2 r(B ?$,1(q(B ?$,1(t(B ?$,2 t(B ?$,1(v(B ?$,1(w(B ?$,2 w(B ?$,2 x(B ?$,2 y(B ?$,2 z(B ?$,2 {(B ?$,1)Q(B ?$,2 }(B ?$,2 ~(B
-;; ?$,2 (B ?$,2! (B ?$,2!!(B ?$,1(!(B ?$,1($(B ?$,2!#(B ?$,1(&(B ?$,1('(B ?$,2!&(B ?$,2!'(B ?$,2!((B ?$,2!)(B ?$,2!*(B ?$,1)P(B ?$,2!,(B ?,A)(B
-;; ?$,1(n(B ?$,1(P(B ?$,1(Q(B ?$,1(f(B ?$,1(T(B ?$,1(U(B ?$,1(d(B ?$,1(S(B ?$,1(e(B ?$,1(X(B ?$,1(Y(B ?$,1(Z(B ?$,1([(B ?$,1(\(B ?$,1(](B ?$,1(^(B
-;; ?$,1(_(B ?$,1(o(B ?$,1(`(B ?$,1(a(B ?$,1(b(B ?$,1(c(B ?$,1(V(B ?$,1(R(B ?$,1(l(B ?$,1(k(B ?$,1(W(B ?$,1(h(B ?$,1(m(B ?$,1(i(B ?$,1(g(B ?$,1(j(B
-;; ?$,1(N(B ?$,1(0(B ?$,1(1(B ?$,1(F(B ?$,1(4(B ?$,1(5(B ?$,1(D(B ?$,1(3(B ?$,1(E(B ?$,1(8(B ?$,1(9(B ?$,1(:(B ?$,1(;(B ?$,1(<(B ?$,1(=(B ?$,1(>(B
-;; ?$,1(?(B ?$,1(O(B ?$,1(@(B ?$,1(A(B ?$,1(B(B ?$,1(C(B ?$,1(6(B ?$,1(2(B ?$,1(L(B ?$,1(K(B ?$,1(7(B ?$,1(H(B ?$,1(M(B ?$,1(I(B ?$,1(G(B ?$,1(J(B
-;; 8859-5 plus Unicode:
- ?$,2 (B ?$,2 "(B ?$,2 ,(B ?$,2 0(B ?$,2 4(B ?$,2 8(B ?$,2 <(B ?$,2 D(B ?$,2 L(B ?$,2 T(B ?$,2 \(B ?$,2!@(B ?$,2!D(B ?$,2!H(B ?$,2!L(B ?$,2!P(B
- ?$,2!Q(B ?$,2!R(B ?$,2!S(B ?$,1{ (B ?$,2!`(B ?$,1x9(B ?$,1x:(B ?$,1xh(B ?$,1y$(B ?$,1y%(B ?,L (B ?$,1{!(B ?,A0(B ?,A2(B ?,A7(B ?,Aw(B
- ?$,2 p(B ?$,2 q(B ?$,2 r(B ?,Lq(B ?,Lt(B ?$,2 t(B ?,Lv(B ?,Lw(B ?$,2 w(B ?$,2 x(B ?$,2 y(B ?$,2 z(B ?$,2 {(B ?$,1)Q(B ?$,2 }(B ?$,2 ~(B
- ?$,2 (B ?$,2! (B ?$,2!!(B ?,L!(B ?,L$(B ?$,2!#(B ?,L&(B ?,L'(B ?$,2!&(B ?$,2!'(B ?$,2!((B ?$,2!)(B ?$,2!*(B ?$,1)P(B ?$,2!,(B ?,A)(B
- ?,Ln(B ?,LP(B ?,LQ(B ?,Lf(B ?,LT(B ?,LU(B ?,Ld(B ?,LS(B ?,Le(B ?,LX(B ?,LY(B ?,LZ(B ?,L[(B ?,L\(B ?,L](B ?,L^(B
- ?,L_(B ?,Lo(B ?,L`(B ?,La(B ?,Lb(B ?,Lc(B ?,LV(B ?,LR(B ?,Ll(B ?,Lk(B ?,LW(B ?,Lh(B ?,Lm(B ?,Li(B ?,Lg(B ?,Lj(B
- ?,LN(B ?,L0(B ?,L1(B ?,LF(B ?,L4(B ?,L5(B ?,LD(B ?,L3(B ?,LE(B ?,L8(B ?,L9(B ?,L:(B ?,L;(B ?,L<(B ?,L=(B ?,L>(B
- ?,L?(B ?,LO(B ?,L@(B ?,LA(B ?,LB(B ?,LC(B ?,L6(B ?,L2(B ?,LL(B ?,LK(B ?,L7(B ?,LH(B ?,LM(B ?,LI(B ?,LG(B ?,LJ(B
- ]
- "Cyrillic KOI8-U decoding table.")
-
-(let ((table (make-translation-table-from-vector
- cyrillic-koi8-u-decode-table)))
- (define-translation-table 'cyrillic-koi8-u-nonascii-translation-table table)
- (define-translation-table 'cyrillic-koi8-u-encode-table
- (char-table-extra-slot table 0)))
-
-(makunbound 'cyrillic-koi8-u-decode-table)
-
-(define-ccl-program ccl-decode-koi8-u
- `(4
- ((loop
- (r0 = 0)
- (read r1)
- (if (r1 < 128)
- (write-repeat r1)
- ((translate-character cyrillic-koi8-u-nonascii-translation-table r0 r1)
- (translate-character ucs-translation-table-for-decode r0 r1)
- (write-multibyte-character r0 r1)
- (repeat))))))
- "CCL program to decode KOI8-U.")
-
-(define-ccl-program ccl-encode-koi8-u
- `(1
- ((loop
- (read-multibyte-character r0 r1)
- (translate-character cyrillic-koi8-u-encode-table r0 r1)
- (if (r0 != ,(charset-id 'ascii))
- (if (r0 != ,(charset-id 'eight-bit-graphic))
- (if (r0 != ,(charset-id 'eight-bit-control))
- (r1 = ??))))
- (write-repeat r1))))
- "CCL program to encode KOI8-U.")
-
-(cyrillic-unify-encoding 'cyrillic-koi8-u-encode-table)
-
-(make-coding-system
- 'koi8-u 4
- ?U "KOI8-U 8-bit encoding for Cyrillic (MIME: KOI8-U)"
- '(ccl-decode-koi8-u . ccl-encode-koi8-u)
- `((safe-chars . cyrillic-koi8-u-encode-table)
- (mime-charset . koi8-u)
- (valid-codes (0 . 255))
- (dependency unify-8859-on-encoding-mode unify-8859-on-decoding-mode)))
-
-(define-ccl-program ccl-encode-koi8-u-font
- `(0
- (translate-character cyrillic-koi8-u-encode-table r0 r1))
- "CCL program to encode Cyrillic chars to KOI-U font.")
-
-(add-to-list 'font-ccl-encoder-alist '("koi8-u" . ccl-encode-koi8-u-font))
+(define-coding-system 'koi8-u
+ "KOI8-U 8-bit encoding for Cyrillic (MIME: KOI8-U)"
+ :coding-type 'charset
+ :mnemonic ?U
+ :charset-list '(koi8-u)
+ :mime-charset 'koi8-u)
(set-language-info-alist
- "Ukrainian" `((coding-system koi8-u)
+ "Ukrainian" `((charset koi8-u)
+ (coding-system koi8-u)
(coding-priority koi8-u)
- (nonascii-translation
- . ,(get 'cyrillic-koi8-u-nonascii-translation-table
- 'translation-table))
+ (nonascii-translation . koi8-u)
(input-method . "ukrainian-computer")
(documentation
. "Support for Ukrainian with KOI8-U character set."))
@@ -349,103 +145,19 @@ Support for Russian using koi8-r and the russian-computer input method.")
;;; ALTERNATIVNYJ stuff
-;; Fixme: It's unclear what's the correct table. I've found
-;; statements both that it's the same as cp866 and somewhat different,
-;; but nothing that looks really definitive.
-(defvar cyrillic-alternativnyj-decode-table
- [
- 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
- 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
- 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
- 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
- 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
- 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
- 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
- 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
-;; ?$,1(0(B ?$,1(1(B ?$,1(2(B ?$,1(3(B ?$,1(4(B ?$,1(5(B ?$,1(6(B ?$,1(7(B ?$,1(8(B ?$,1(9(B ?$,1(:(B ?$,1(;(B ?$,1(<(B ?$,1(=(B ?$,1(>(B ?$,1(?(B
-;; ?$,1(@(B ?$,1(A(B ?$,1(B(B ?$,1(C(B ?$,1(D(B ?$,1(E(B ?$,1(F(B ?$,1(G(B ?$,1(H(B ?$,1(I(B ?$,1(J(B ?$,1(K(B ?$,1(L(B ?$,1(M(B ?$,1(N(B ?$,1(O(B
-;; ?$,1(P(B ?$,1(Q(B ?$,1(R(B ?$,1(S(B ?$,1(T(B ?$,1(U(B ?$,1(V(B ?$,1(W(B ?$,1(X(B ?$,1(Y(B ?$,1(Z(B ?$,1([(B ?$,1(\(B ?$,1(](B ?$,1(^(B ?$,1(_(B
-;; ?$,2!Q(B ?$,2!R(B ?$,2!S(B ?$,2 "(B ?$,2 D(B ?$,2!!(B ?$,2!"(B ?$,2 v(B ?$,2 u(B ?$,2!#(B ?$,2 q(B ?$,2 w(B ?$,2 }(B ?$,2 |(B ?$,2 {(B ?$,2 0(B
-;; ?$,2 4(B ?$,2 T(B ?$,2 L(B ?$,2 <(B ?$,2 (B ?$,2 \(B ?$,2 ~(B ?$,2 (B ?$,2 z(B ?$,2 t(B ?$,2!)(B ?$,2!&(B ?$,2! (B ?$,2 p(B ?$,2!,(B ?$,2!'(B
-;; ?$,2!((B ?$,2!$(B ?$,2!%(B ?$,2 y(B ?$,2 x(B ?$,2 r(B ?$,2 s(B ?$,2!+(B ?$,2!*(B ?$,2 8(B ?$,2 ,(B ?$,2!H(B ?$,2!D(B ?$,2!L(B ?$,2!P(B ?$,2!@(B
-;; ?$,1(`(B ?$,1(a(B ?$,1(b(B ?$,1(c(B ?$,1(d(B ?$,1(e(B ?$,1(f(B ?$,1(g(B ?$,1(h(B ?$,1(i(B ?$,1(j(B ?$,1(k(B ?$,1(l(B ?$,1(m(B ?$,1(n(B ?$,1(o(B
-;; ?$,1(!(B ?$,1(q(B ?$,1ry(B ?$,1rx(B ?$,1%A(B ?$,1%@(B ?$,1s:(B ?$,1s9(B ?$,1vq(B ?$,1vs(B ?,A1(B ?,Aw(B ?$,1uV(B ?,A$(B ?$,2!`(B ?,A (B ;
-;; 8859+Unicode
- ?,L0(B ?,L1(B ?,L2(B ?,L3(B ?,L4(B ?,L5(B ?,L6(B ?,L7(B ?,L8(B ?,L9(B ?,L:(B ?,L;(B ?,L<(B ?,L=(B ?,L>(B ?,L?(B
- ?,L@(B ?,LA(B ?,LB(B ?,LC(B ?,LD(B ?,LE(B ?,LF(B ?,LG(B ?,LH(B ?,LI(B ?,LJ(B ?,LK(B ?,LL(B ?,LM(B ?,LN(B ?,LO(B
- ?,LP(B ?,LQ(B ?,LR(B ?,LS(B ?,LT(B ?,LU(B ?,LV(B ?,LW(B ?,LX(B ?,LY(B ?,LZ(B ?,L[(B ?,L\(B ?,L](B ?,L^(B ?,L_(B
- ?$,2!Q(B ?$,2!R(B ?$,2!S(B ?$,2 "(B ?$,2 D(B ?$,2!!(B ?$,2!"(B ?$,2 v(B ?$,2 u(B ?$,2!#(B ?$,2 q(B ?$,2 w(B ?$,2 }(B ?$,2 |(B ?$,2 {(B ?$,2 0(B
- ?$,2 4(B ?$,2 T(B ?$,2 L(B ?$,2 <(B ?$,2 (B ?$,2 \(B ?$,2 ~(B ?$,2 (B ?$,2 z(B ?$,2 t(B ?$,2!)(B ?$,2!&(B ?$,2! (B ?$,2 p(B ?$,2!,(B ?$,2!'(B
- ?$,2!((B ?$,2!$(B ?$,2!%(B ?$,2 y(B ?$,2 x(B ?$,2 r(B ?$,2 s(B ?$,2!+(B ?$,2!*(B ?$,2 8(B ?$,2 ,(B ?$,2!H(B ?$,2!D(B ?$,2!L(B ?$,2!P(B ?$,2!@(B
- ?,L`(B ?,La(B ?,Lb(B ?,Lc(B ?,Ld(B ?,Le(B ?,Lf(B ?,Lg(B ?,Lh(B ?,Li(B ?,Lj(B ?,Lk(B ?,Ll(B ?,Lm(B ?,Ln(B ?,Lo(B
- ;; Taken from http://www.cyrillic.com/ref/cyrillic/koi-8alt.html
- ;; with guesses for the Unicodes of the glyphs in the absence of a
- ;; table.
- ?,L!(B ?,Lq(B ?$,1ry(B ?$,1rx(B ?$,1%A(B ?$,1%@(B ?$,1s:(B ?$,1s9(B ?$,1vq(B ?$,1vs(B ?,A1(B ?,Aw(B ?,Lp(B ?,A$(B ?$,2!`(B ?,L (B]
- "Cyrillic ALTERNATIVNYJ decoding table.")
-
-(let ((table (make-translation-table-from-vector
- cyrillic-alternativnyj-decode-table)))
- (define-translation-table 'cyrillic-alternativnyj-nonascii-translation-table
- table)
- (define-translation-table 'cyrillic-alternativnyj-encode-table
- (char-table-extra-slot table 0)))
-
-(makunbound 'cyrillic-alternativnyj-decode-table)
-
-(define-ccl-program ccl-decode-alternativnyj
- `(4
- ((loop
- (r0 = 0)
- (read r1)
- (if (r1 < 128)
- (write-repeat r1)
- ((translate-character cyrillic-alternativnyj-nonascii-translation-table
- r0 r1)
- (translate-character ucs-translation-table-for-decode r0 r1)
- (write-multibyte-character r0 r1)
- (repeat))))))
- "CCL program to decode Alternativnyj.")
-
-(define-ccl-program ccl-encode-alternativnyj
- `(1
- ((loop
- (read-multibyte-character r0 r1)
- (translate-character cyrillic-alternativnyj-encode-table r0 r1)
- (if (r0 != ,(charset-id 'ascii))
- (if (r0 != ,(charset-id 'eight-bit-graphic))
- (if (r0 != ,(charset-id 'eight-bit-control))
- (r1 = ??))))
- (write-repeat r1))))
- "CCL program to encode Alternativnyj.")
-
-(cyrillic-unify-encoding 'cyrillic-alternativnyj-encode-table)
-
-(make-coding-system
- 'cyrillic-alternativnyj 4 ?A
- "ALTERNATIVNYJ 8-bit encoding for Cyrillic."
- '(ccl-decode-alternativnyj . ccl-encode-alternativnyj)
- `((safe-chars . cyrillic-alternativnyj-encode-table)
- (valid-codes (0 . 255))
- (dependency unify-8859-on-encoding-mode unify-8859-on-decoding-mode)))
+(define-coding-system 'cyrillic-alternativnyj
+ "ALTERNATIVNYJ 8-bit encoding for Cyrillic."
+ :coding-type 'charset
+ :mnemonic ?A
+ :charset-list '(alternativnyj))
(define-coding-system-alias 'alternativnyj 'cyrillic-alternativnyj)
-(define-ccl-program ccl-encode-alternativnyj-font
- `(0
- (translate-character cyrillic-alternativnyj-encode-table r0 r1))
- "CCL program to encode Cyrillic chars to Alternativnyj font.")
-
-(add-to-list 'font-ccl-encoder-alist
- '("alternativnyj" . ccl-encode-alternativnyj-font))
-
(set-language-info-alist
- "Cyrillic-ALT" `((charset cyrillic-iso8859-5)
- (nonascii-translation
- . ,(get 'cyrillic-alternativnyj-nonascii-translation-table
- 'translation-table))
+ "Cyrillic-ALT" `((charset alternativnyj)
(coding-system cyrillic-alternativnyj)
(coding-priority cyrillic-alternativnyj)
+ (nonascii-translation . alternativnyj)
(input-method . "russian-typewriter")
(features cyril-util)
(unibyte-display . cyrillic-alternativnyj)
@@ -453,49 +165,82 @@ Support for Russian using koi8-r and the russian-computer input method.")
(documentation . "Support for Cyrillic ALTERNATIVNYJ."))
'("Cyrillic"))
+(define-coding-system 'cp866
+ "CP866 encoding for Cyrillic."
+ :coding-type 'charset
+ :mnemonic ?*
+ :charset-list '(ibm866)
+ :mime-charset 'cp866)
+
+(define-coding-system 'koi8-u
+ "KOI8-U 8-bit encoding for Cyrillic (MIME: KOI8-U)"
+ :coding-type 'charset
+ :mnemonic ?U
+ :charset-list '(koi8-u)
+ :mime-charset 'koi8-u)
+
+(define-coding-system 'koi8-t
+ "KOI8-T 8-bit encoding for Cyrillic"
+ :coding-type 'charset
+ :mnemonic ?*
+ :charset-list '(koi8-t)
+ :mime-charset 'koi8-t)
+
+(define-coding-system 'windows-1251
+ "windows-1251 8-bit encoding for Cyrillic (MIME: WINDOWS-1251)"
+ :coding-type 'charset
+ :mnemonic ?b
+ :charset-list '(windows-1251)
+ :mime-charset 'windows-1251)
+(define-coding-system-alias 'cp1251 'windows-1251)
+
+(define-coding-system 'cp1125
+ "cp1125 8-bit encoding for Cyrillic"
+ :coding-type 'charset
+ :mnemonic ?*
+ :charset-list '(cp1125))
+(define-coding-system-alias 'ruscii 'cp1125)
+;; Original name for cp1125, says Serhii Hlodin <hlodin@lutsk.bank.gov.ua>
+(define-coding-system-alias 'cp866u 'cp1125)
+
+(define-coding-system 'cp855
+ "DOS codepage 855 (Russian)"
+ :coding-type 'charset
+ :mnemonic ?D
+ :charset-list '(cp855)
+ :mime-charset 'cp855)
+(define-coding-system-alias 'ibm855 'cp855)
+
+(define-coding-system 'mik
+ "Bulgarian DOS codepage"
+ :coding-type 'charset
+ :mnemonic ?D
+ :charset-list '(mik))
+
+(define-coding-system 'pt154
+ "Parattype Asian Cyrillic codepage"
+ :coding-type 'charset
+ :mnemonic ?D
+ :charset-list '(pt154))
+
+;; (set-language-info-alist
+;; "Windows-1251" `((coding-system windows-1251)
+;; (coding-priority windows-1251)
+;; (input-method . "russian-typewriter") ; fixme?
+;; (features code-pages)
+;; (documentation . "Support for windows-1251 character set."))
+;; '("Cyrillic"))
+
(set-language-info-alist
- "Tajik" `((coding-system cyrillic-koi8-t)
- (coding-priority cyrillic-koi8-t)
- (nonascii-translation
- . ,(get 'decode-koi8-t 'translation-table))
+ "Tajik" `((coding-system koi8-t)
+ (coding-priority koi8-t)
+ (nonascii-translation . cyrillic-koi8-t)
+ (charset koi8-t)
(input-method . "russian-typewriter") ; fixme?
(features code-pages)
(documentation . "Support for Tajik using KOI8-T."))
'("Cyrillic"))
-(eval-and-compile
- (setq
- non-iso-charset-alist
- (cp-make-coding-system
- windows-1251
- [?\$,1("(B ?\$,1(#(B ?\$,1rz(B ?\$,1(s(B ?\$,1r~(B ?\$,1s&(B ?\$,1s (B ?\$,1s!(B ?\$,1tL(B ?\$,1s0(B ?\$,1()(B ?\$,1s9(B ?\$,1(*(B ?\$,1(,(B ?\$,1(+(B ?\$,1(/(B ?\$,1(r(B
- ?\$,1rx(B ?\$,1ry(B ?\$,1r|(B ?\$,1r}(B ?\$,1s"(B ?\$,1rs(B ?\$,1rt(B nil ?\$,1ub(B ?\$,1(y(B ?\$,1s:(B ?\$,1(z(B ?\$,1(|(B ?\$,1({(B ?\$,1((B ?\,A (B ?\$,1(.(B
- ?\$,1(~(B ?\$,1(((B ?\,A$(B ?\$,1)P(B ?\,A&(B ?\,A'(B ?\$,1(!(B ?\,A)(B ?\$,1($(B ?\,A+(B ?\,A,(B ?\,A-(B ?\,A.(B ?\$,1('(B ?\,A0(B ?\,A1(B ?\$,1(&(B
- ?\$,1(v(B ?\$,1)Q(B ?\,A5(B ?\,A6(B ?\,A7(B ?\$,1(q(B ?\$,1uV(B ?\$,1(t(B ?\,A;(B ?\$,1(x(B ?\$,1(%(B ?\$,1(u(B ?\$,1(w(B ?\$,1(0(B ?\$,1(1(B ?\$,1(2(B ?\$,1(3(B
- ?\$,1(4(B ?\$,1(5(B ?\$,1(6(B ?\$,1(7(B ?\$,1(8(B ?\$,1(9(B ?\$,1(:(B ?\$,1(;(B ?\$,1(<(B ?\$,1(=(B ?\$,1(>(B ?\$,1(?(B ?\$,1(@(B ?\$,1(A(B ?\$,1(B(B ?\$,1(C(B ?\$,1(D(B
- ?\$,1(E(B ?\$,1(F(B ?\$,1(G(B ?\$,1(H(B ?\$,1(I(B ?\$,1(J(B ?\$,1(K(B ?\$,1(L(B ?\$,1(M(B ?\$,1(N(B ?\$,1(O(B ?\$,1(P(B ?\$,1(Q(B ?\$,1(R(B ?\$,1(S(B ?\$,1(T(B ?\$,1(U(B
- ?\$,1(V(B ?\$,1(W(B ?\$,1(X(B ?\$,1(Y(B ?\$,1(Z(B ?\$,1([(B ?\$,1(\(B ?\$,1(](B ?\$,1(^(B ?\$,1(_(B ?\$,1(`(B ?\$,1(a(B ?\$,1(b(B ?\$,1(c(B ?\$,1(d(B ?\$,1(e(B ?\$,1(f(B
- ?\$,1(g(B ?\$,1(h(B ?\$,1(i(B ?\$,1(j(B ?\$,1(k(B ?\$,1(l(B ?\$,1(m(B ?\$,1(n(B ?\$,1(o(B] nil ?b)))
-
-;; Register cyrillic-iso8859-5 characters in the encode table of
-;; windows-1251.
-(let ((table (get 'encode-windows-1251 'translation-table))
- ;; Nth element is a cyrillic-iso8859-5 character encoded to a
- ;; code (128 + N), or nil.
- (vec [?\,L"(B ?\,L#(B nil ?\,Ls(B nil nil nil nil nil nil ?\,L)(B nil ?\,L*(B ?\,L,(B ?\,L+(B ?\,L/(B
- ?\,Lr(B nil nil nil nil nil nil nil nil nil ?\,Ly(B nil ?\,Lz(B ?\,L|(B ?\,L{(B ?\,L(B
- nil ?\,L.(B ?\,L~(B ?\,L((B nil nil nil nil ?\,L!(B nil ?\,L$(B nil nil nil nil ?\,L'(B
- nil nil ?\,L&(B ?\,Lv(B nil nil nil nil ?\,Lq(B ?\,Lp(B ?\,Lt(B nil ?\,Lx(B ?\,L%(B ?\,Lu(B ?\,Lw(B
- ?\,L0(B ?\,L1(B ?\,L2(B ?\,L3(B ?\,L4(B ?\,L5(B ?\,L6(B ?\,L7(B ?\,L8(B ?\,L9(B ?\,L:(B ?\,L;(B ?\,L<(B ?\,L=(B ?\,L>(B ?\,L?(B
- ?\,L@(B ?\,LA(B ?\,LB(B ?\,LC(B ?\,LD(B ?\,LE(B ?\,LF(B ?\,LG(B ?\,LH(B ?\,LI(B ?\,LJ(B ?\,LK(B ?\,LL(B ?\,LM(B ?\,LN(B ?\,LO(B
- ?\,LP(B ?\,LQ(B ?\,LR(B ?\,LS(B ?\,LT(B ?\,LU(B ?\,LV(B ?\,LW(B ?\,LX(B ?\,LY(B ?\,LZ(B ?\,L[(B ?\,L\(B ?\,L](B ?\,L^(B ?\,L_(B
- ?\,L`(B ?\,La(B ?\,Lb(B ?\,Lc(B ?\,Ld(B ?\,Le(B ?\,Lf(B ?\,Lg(B ?\,Lh(B ?\,Li(B ?\,Lj(B ?\,Lk(B ?\,Ll(B ?\,Lm(B ?\,Ln(B ?\,Lo(B]))
- (dotimes (i (length vec))
- (if (aref vec i)
- (aset table (aref vec i) (+ 128 i)))))
-
-(define-coding-system-alias 'cp1251 'windows-1251)
-
(let ((elt `("microsoft-cp1251" windows-1251 1
,(get 'encode-windows-1251 'translation-table)))
(slot (assoc "microsoft-cp1251" ctext-non-standard-encodings-alist)))
@@ -503,50 +248,37 @@ Support for Russian using koi8-r and the russian-computer input method.")
(setcdr slot (cdr elt))
(push elt ctext-non-standard-encodings-alist)))
-(define-ccl-program ccl-encode-windows-1251-font
- `(0
- ((if (r0 == ,(charset-id 'mule-unicode-0100-24ff))
- ((r1 <<= 7)
- (r1 += r2)))
- (translate-character encode-windows-1251 r0 r1))))
-
-(add-to-list 'font-ccl-encoder-alist
- '("microsoft-cp1251" . ccl-encode-windows-1251-font))
-
(set-language-info-alist
"Bulgarian" `((coding-system windows-1251)
(coding-priority windows-1251)
+ (nonascii-translation . windows-1251)
+ (charset windows-1251)
(ctext-non-standard-encodings "microsoft-cp1251")
- (overriding-fontspec
- (,(get 'encode-windows-1251 'translation-table)
- . (nil . "microsoft-cp1251"))
- (,(get 'cyrillic-koi8-r-encode-table 'translation-table)
- . (nil . "koi8-r")))
- (nonascii-translation
- . ,(get 'decode-windows-1251 'translation-table))
(input-method . "bulgarian-bds")
(documentation
- . "Support for Bulgarian with windows-1251 character set.")
- (tutorial . "TUTORIAL.bg"))
+ . "Support for Bulgrian with windows-1251 character set."))
'("Cyrillic"))
(set-language-info-alist
"Belarusian" `((coding-system windows-1251)
(coding-priority windows-1251)
+ (nonascii-translation . windows-1251)
+ (charset windows-1251)
(ctext-non-standard-encodings "microsoft-cp1251")
- (overriding-fontspec
- (,(get 'encode-windows-1251 'translation-table)
- . (nil . "microsoft-cp1251"))
- (,(get 'cyrillic-koi8-r-encode-table 'translation-table)
- . (nil . "koi8-r")))
- (nonascii-translation
- . ,(get 'decode-windows-1251 'translation-table))
(input-method . "belarusian")
(documentation
. "Support for Belarusian with windows-1251 character set.
\(The name Belarusian replaced Byelorussian in the early 1990s.)"))
'("Cyrillic"))
+(set-language-info-alist
+ "Ukrainian" `((coding-system koi8-u)
+ (coding-priority koi8-u)
+ (input-method . "ukrainian-computer")
+ (documentation
+ . "Support for Ukrainian with koi8-u character set."))
+ '("Cyrillic"))
+
(provide 'cyrillic)
;;; arch-tag: bda71ae0-ba41-4cb6-a6e0-1dff542313d3
diff --git a/lisp/language/czech.el b/lisp/language/czech.el
index 4eee8fd54b3..5db734565ab 100644
--- a/lisp/language/czech.el
+++ b/lisp/language/czech.el
@@ -35,8 +35,7 @@
(coding-system . (iso-8859-2))
(coding-priority . (iso-8859-2))
(input-method . "czech")
- (nonascii-translation . latin-iso8859-2)
- (unibyte-syntax . "latin-2")
+ (nonascii-translation . iso-8859-2)
(unibyte-display . iso-8859-2)
(tutorial . "TUTORIAL.cs")
(sample-text . "P,Bx(Bejeme v,Ba(Bm hezk,B}(B den!")
diff --git a/lisp/language/devan-util.el b/lisp/language/devan-util.el
index 354d0c19a29..92453078306 100644
--- a/lisp/language/devan-util.el
+++ b/lisp/language/devan-util.el
@@ -1,4 +1,4 @@
-;;; devan-util.el --- Support for composing Devanagari characters
+;;; devan-util.el --- Support for composing Devanagari characters -*-coding: iso-2022-7bit;-*-
;; Copyright (C) 1997, 1998, 2001, 2002, 2003, 2004, 2005, 2006
;; Free Software Foundation, Inc.
@@ -35,8 +35,6 @@
;;; Code:
-;;;###autoload
-
;; Devanagari Composable Pattern
;; C .. Consonants
;; V .. Vowel
@@ -55,6 +53,11 @@
(defconst devanagari-consonant
"[$,15U(B-$,15y68(B-$,16?(B]")
+ ;;("$,16B(B" . nil)
+ ;;("$,16A(B" . nil)
+ ;;("$,16C(B" . nil)
+
+
(defconst devanagari-composable-pattern
(concat
"\\([$,15E(B-$,15T6@6A(B][$,15A5B(B]?\\)\\|[$,15C6D(B]"
@@ -64,6 +67,12 @@
"\\)")
"Regexp matching a composable sequence of Devanagari characters.")
+(dolist (range '((#x0903 . #x0903)
+ (#x0905 . #x0939)
+ (#x0958 . #x0961)))
+ (set-char-table-range indian-composable-pattern range
+ devanagari-composable-pattern))
+
;;;###autoload
(defun devanagari-compose-region (from to)
(interactive "r")
@@ -72,8 +81,8 @@
(narrow-to-region from to)
(goto-char (point-min))
(while (re-search-forward devanagari-composable-pattern nil t)
- (devanagari-compose-syllable-region (match-beginning 0)
- (match-end 0))))))
+ (devanagari-compose-syllable-region (match-beginning 0)
+ (match-end 0))))))
(defun devanagari-compose-string (string)
(with-temp-buffer
(insert (decompose-string string))
@@ -90,11 +99,6 @@
(set-buffer-modified-p buffer-modified-p)
(- (point-max) (point-min))))))
-(defun devanagari-range (from to)
- "Make the list of the integers of range FROM to TO."
- (let (result)
- (while (<= from to) (setq result (cons to result) to (1- to))) result))
-
(defun devanagari-regexp-of-hashtbl-keys (hashtbl)
"Return a regular expression that matches all keys in hashtable HASHTBL."
(let ((max-specpdl-size 1000))
@@ -105,21 +109,18 @@
dummy)
(function (lambda (x y) (> (length x) (length y))))))))
-(defun devanagari-composition-function (from to pattern &optional string)
- "Compose Devanagari characters in REGION, or STRING if specified.
-Assume that the REGION or STRING must fully match the composable
-PATTERN regexp."
- (if string (devanagari-compose-syllable-string string)
- (devanagari-compose-syllable-region from to))
- (- to from))
-
-;; Register a function to compose Devanagari characters.
-(mapc
- (function (lambda (ucs)
- (aset composition-function-table (decode-char 'ucs ucs)
- (list (cons devanagari-composable-pattern
- 'devanagari-composition-function)))))
- (nconc '(#x0903) (devanagari-range #x0905 #x0939) (devanagari-range #x0958 #x0961)))
+;;;###autoload
+(defun devanagari-composition-function (pos &optional string)
+ "Compose Devanagari characters after the position POS.
+If STRING is not nil, it is a string, and POS is an index to the string.
+In this case, compose characters after POS of the string."
+ (if string
+ ;; Not yet implemented.
+ nil
+ (goto-char pos)
+ (if (looking-at devanagari-composable-pattern)
+ (prog1 (match-end 0)
+ (devanagari-compose-syllable-region pos (match-end 0))))))
;; Notes on conversion steps.
@@ -496,11 +497,10 @@ preferred rule from the sanskrit fonts." )
(defvar dev-glyph-glyph-2-regexp
(devanagari-regexp-of-hashtbl-keys dev-glyph-glyph-2-hash))
-
(defun dev-charseq (from &optional to)
(if (null to) (setq to from))
- (mapcar (function (lambda (x) (indian-glyph-char x 'devanagari)))
- (devanagari-range from to)))
+ (number-sequence (decode-char 'devanagari-cdac from)
+ (decode-char 'devanagari-cdac to)))
(defvar dev-glyph-cvn
(append
diff --git a/lisp/language/devanagari.el b/lisp/language/devanagari.el
index 1b6d9100b5b..515b8f4bbaf 100644
--- a/lisp/language/devanagari.el
+++ b/lisp/language/devanagari.el
@@ -34,8 +34,8 @@
"Devanagari" '((charset indian-is13194 mule-unicode-0100-24ff
indian-2-column indian-glyph ;; comment out later
)
- (coding-system in-is13194)
- (coding-priority in-is13194)
+ (coding-system in-is13194-devanagari)
+ (coding-priority in-is13194-devanagari)
(input-method . "dev-aiba")
(features devan-util)
(documentation . "\
@@ -43,6 +43,13 @@ Such languages using Devanagari script as Hindi and Marathi
are supported in this language environment."))
'("Indian"))
+;; For automatic composition.
+(dolist (range '((#x0903 . #x0903)
+ (#x0905 . #x0939)
+ (#x0958 . #x0961)))
+ (set-char-table-range composition-function-table range
+ 'devanagari-composition-function))
+
(provide 'devanagari)
;;; arch-tag: fd13667d-868b-41e8-81ef-79dd28bbfed2
diff --git a/lisp/language/english.el b/lisp/language/english.el
index f3719fd9bbc..00eba111742 100644
--- a/lisp/language/english.el
+++ b/lisp/language/english.el
@@ -5,6 +5,9 @@
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
+;; Copyright (C) 2003
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H13PRO009
;; Keywords: multibyte character, character set, syntax, category
@@ -41,6 +44,26 @@
Nothing special is needed to handle English.")
))
+;; Mostly because we can now...
+(define-coding-system 'ebcdic-us
+ "US version of EBCDIC"
+ :coding-type 'charset
+ :charset-list '(ebcdic-us)
+ :mnemonic ?*)
+
+(define-coding-system 'ebcdic-uk
+ "UK version of EBCDIC"
+ :coding-type 'charset
+ :charset-list '(ebcdic-uk)
+ :mnemonic ?*)
+
+(define-coding-system 'ibm1047
+ "A version of EBCDIC used in OS/390 Unix" ; says Groff
+ :coding-type 'charset
+ :charset-list '(ibm1047)
+ :mnemonic ?*)
+(define-coding-system-alias 'cp1047 'ibm1047)
+
;; Make "ASCII" an alias of "English" language environment.
(set-language-info-alist
"ASCII" (cdr (assoc "English" language-info-alist)))
diff --git a/lisp/language/ethio-util.el b/lisp/language/ethio-util.el
index b22fad32854..93de5e74c4d 100644
--- a/lisp/language/ethio-util.el
+++ b/lisp/language/ethio-util.el
@@ -1,10 +1,13 @@
-;;; ethio-util.el --- utilities for Ethiopic -*- coding: iso-2022-7bit; -*-
+;;; ethio-util.el --- utilities for Ethiopic -*- coding: utf-8-emacs; -*-
;; Copyright (C) 1997, 1998, 2002, 2003, 2004, 2005, 2006
;; Free Software Foundation, Inc.
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
+;; Copyright (C) 2005, 2006
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number: H15PRO110
;; Keywords: mule, multilingual, Ethiopic
@@ -31,6 +34,8 @@
;;; Code:
+(require 'robin)
+
(defvar rmail-current-message)
(defvar rmail-message-vector)
@@ -41,36 +46,17 @@
(defun setup-ethiopic-environment-internal ()
(let ((key-bindings '((" " . ethio-insert-space)
([?\S- ] . ethio-insert-ethio-space)
- ([?\C-'] . ethio-gemination)
-
- ;; these old bindings conflict
- ;; with Emacs' binding policy
-
- ;; ([f2] . ethio-toggle-space)
- ;; ([S-f2] . ethio-replace-space) ; as requested
- ;; ([f3] . ethio-toggle-punctuation)
- ;; ([f4] . ethio-sera-to-fidel-buffer)
- ;; ([S-f4] . ethio-sera-to-fidel-region)
- ;; ([C-f4] . ethio-sera-to-fidel-mail-or-marker)
- ;; ([f5] . ethio-fidel-to-sera-buffer)
- ;; ([S-f5] . ethio-fidel-to-sera-region)
- ;; ([C-f5] . ethio-fidel-to-sera-mail-or-marker)
- ;; ([f6] . ethio-modify-vowel)
- ;; ([f7] . ethio-replace-space)
- ;; ([f8] . ethio-input-special-character)
-
- ;; this is the rewritten bindings
-
+ ;; ([?\C-'] . ethio-gemination)
([f3] . ethio-fidel-to-sera-buffer)
([S-f3] . ethio-fidel-to-sera-region)
- ([C-f3] . ethio-fidel-to-sera-mail-or-marker)
+ ([C-f3] . ethio-fidel-to-sera-marker)
([f4] . ethio-sera-to-fidel-buffer)
([S-f4] . ethio-sera-to-fidel-region)
- ([C-f4] . ethio-sera-to-fidel-mail-or-marker)
+ ([C-f4] . ethio-sera-to-fidel-marker)
([S-f5] . ethio-toggle-punctuation)
([S-f6] . ethio-modify-vowel)
([S-f7] . ethio-replace-space)
- ([S-f8] . ethio-input-special-character)
+ ;; ([S-f8] . ethio-input-special-character) ; deprecated
([C-f9] . ethio-toggle-space)
([S-f9] . ethio-replace-space) ; as requested
))
@@ -83,7 +69,6 @@
(global-set-key kb (cdr (car key-bindings)))
(setq key-bindings (cdr key-bindings))))
- (add-hook 'quail-activate-hook 'ethio-select-a-translation)
(add-hook 'find-file-hook 'ethio-find-file)
(add-hook 'write-file-functions 'ethio-write-file)
(add-hook 'after-save-hook 'ethio-find-file))
@@ -96,7 +81,6 @@
(setq exit-ethiopic-environment-data
(cdr exit-ethiopic-environment-data)))
- (remove-hook 'quail-activate-hook 'ethio-select-a-translation)
(remove-hook 'find-file-hook 'ethio-find-file)
(remove-hook 'write-file-functions 'ethio-write-file)
(remove-hook 'after-save-hook 'ethio-find-file))
@@ -114,15 +98,6 @@
;;
;; If the filename ends in ".tex", editing is done in fidel
;; but file I/O is done in EthioTeX format.
-;;
-;; To automatically convert Ethiopic text to SERA format when sending mail,
-;; (add-hook 'mail-send-hook 'ethio-fidel-to-sera-mail)
-;;
-;; To automatically convert SERA format to Ethiopic when receiving mail,
-;; (add-hook 'rmail-show-message-hook 'ethio-sera-to-fidel-mail)
-;;
-;; To automatically convert Ethiopic text to SERA format when posting news,
-;; (add-hook 'news-inews-hook 'ethio-fidel-to-sera-mail)
;;
;; users' preference
@@ -149,7 +124,7 @@ mark. All SERA <--> FIDEL converters refer this variable.")
(defvar ethio-quote-vowel-always nil
"*Non-nil means always put an apostrophe before an isolated vowel (except at word initial) in FIDEL --> SERA conversion.
-If nil, put an apostrophe only between a sixth-form consonant and an
+If nil, put an apostrophe only between a 6th-form consonant and an
isolated vowel.")
(defvar ethio-W-sixth-always nil
@@ -163,313 +138,98 @@ For example, ({10}{9}{100}{80}{7}) is converted into:
`109100807 if `ethio-numeric-reduction' is 1,
`10900807 if `ethio-numeric-reduction' is 2.")
-(defvar ethio-implicit-period-conversion t
- "*Non-nil means replacing the Ethiopic dot at the end of an Ethiopic sentence
-with an Ethiopic full stop.")
-
(defvar ethio-java-save-lowercase nil
"*Non-nil means save Ethiopic characters in lowercase hex numbers to Java files.
If nil, use uppercases.")
+(defun ethio-prefer-amharic-p ()
+ (or (eq ethio-primary-language 'amharic)
+ (and (not (eq ethio-primary-language 'tigrigna))
+ (eq ethio-secondary-language 'amharic))))
+
+(defun ethio-prefer-amharic (arg)
+ (if arg
+ (progn
+ (robin-modify-package "ethiopic-sera" "'a" ?አ)
+ (robin-modify-package "ethiopic-sera" "a" "አ")
+ (robin-modify-package "ethiopic-sera" "'A" ?ኣ)
+ (robin-modify-package "ethiopic-sera" "A" "ኣ"))
+ (robin-modify-package "ethiopic-sera" "'A" ?አ)
+ (robin-modify-package "ethiopic-sera" "A" "አ")
+ (robin-modify-package "ethiopic-sera" "'a" ?ኣ)
+ (robin-modify-package "ethiopic-sera" "a" "ኣ")))
+
+(defun ethio-use-colon-for-colon (arg)
+ (if arg
+ (progn
+ (robin-modify-package "ethiopic-sera" ":" ?á¥)
+ (robin-modify-package "ethiopic-sera" "`:" ?á¡))
+ (robin-modify-package "ethiopic-sera" " : " ?á¡)
+ (robin-modify-package "ethiopic-sera" ":" "á¡")
+ (robin-modify-package "ethiopic-sera" "-:" ?á¥)))
+
+(defun ethio-use-three-dot-question (arg)
+ (if arg
+ (progn
+ (robin-modify-package "ethiopic-sera" "?" ?á§)
+ (robin-modify-package "ethiopic-sera" "`?" ??))
+ (robin-modify-package "ethiopic-sera" "?" ??)
+ (robin-modify-package "ethiopic-sera" "`?" ?á§)))
+
+(defun ethio-adjust-robin ()
+ (ethio-prefer-amharic (ethio-prefer-amharic-p))
+ (ethio-use-colon-for-colon ethio-use-colon-for-colon)
+ (ethio-use-three-dot-question ethio-use-three-dot-question))
+
+(add-hook 'robin-activate-hook 'ethio-adjust-robin)
+
;;
;; SERA to FIDEL
;;
-(defconst ethio-sera-to-fidel-table
- [
- nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
- nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
-;;; SP
- (" "
- (?: (if ethio-use-colon-for-colon " $(3$l(B" "$(3$h(B")
- (32 (if ethio-use-colon-for-colon " $(3$l(B " "$(3$h(B"))
- (?- " $(3$m(B")
- (?: " $(3$i(B")
- (?| (if ethio-use-colon-for-colon " $(3$l(B|" " $(3$h(B|")
- (?: " $(3$o(B"))))
-
-;;; ! " # $ % & '
- nil nil nil nil nil nil ("" (?' "$(3%s(B"))
-;;; ( ) * + , - .
- nil nil nil nil ("$(3$j(B") ("-" (?: "$(3$l(B")) ("$(3%u(B")
-;;; / 0 1 2 3 4 5 6 7 8 9
- nil nil nil nil nil nil nil nil nil nil nil
-;;; :
- ((if ethio-use-colon-for-colon "$(3$l(B" "$(3$h(B")
- (32 (if ethio-use-colon-for-colon "$(3$l(B " "$(3$h(B"))
- (?- "$(3$m(B")
- (?: "$(3$i(B")
- (?| (if ethio-use-colon-for-colon "$(3$l(B|" "$(3$h(B|")
- (?: "$(3$o(B")))
-;;; ; < = >
- ("$(3$k(B") ("<" (?< "$(3%v(B")) nil (">" (?> "$(3%w(B"))
-;;; ?
- ((if ethio-use-three-dot-question "$(3$n(B" "$(3%x(B"))
-;;; @
- nil
-;;; A
- ("$(3"f(B" (?2 "$(3#8(B"))
-;;; B
- ("$(3"((B" (?e "$(3"#(B") (?u "$(3"$(B") (?i "$(3"%(B") (?a "$(3"&(B") (?E "$(3"'(B") (?o "$(3")(B")
- (?W "$(3%b(B" (?e "$(3%2(B") (?u "$(3%b(B") (?i "$(3%B(B") (?a "$(3"*(B") (?E "$(3%R(B")))
-;;; C
- ("$(3$4(B" (?e "$(3$/(B") (?u "$(3$0(B") (?i "$(3$1(B") (?a "$(3$2(B") (?E "$(3$3(B") (?o "$(3$5(B")
- (?W "$(3$6(B" (?a "$(3$6(B")
- (?e "$(3$4%n(B") (?u "$(3$4%r(B") (?i "$(3$4%o(B") (?E "$(3$4%q(B")))
-;;; D
- ("$(3#b(B" (?e "$(3#](B") (?u "$(3#^(B") (?i "$(3#_(B") (?a "$(3#`(B") (?E "$(3#a(B") (?o "$(3#c(B")
- (?W "$(3#d(B" (?a "$(3#d(B")
- (?e "$(3#b%n(B") (?u "$(3#b%r(B") (?i "$(3#b%o(B") (?E "$(3#b%q(B")))
-;;; E
- ("$(3"g(B" (?2 "$(3#9(B"))
-;;; F
- ("$(3$T(B" (?e "$(3$O(B") (?u "$(3$P(B") (?i "$(3$Q(B") (?a "$(3$R(B") (?E "$(3$S(B") (?o "$(3$U(B")
- (?W "$(3%d(B" (?e "$(3%4(B") (?u "$(3%d(B") (?i "$(3%D(B") (?a "$(3$V(B") (?E "$(3%T(B"))
- (?Y "$(3$a(B" (?a "$(3$a(B")))
-;;; G
- ("$(3$$(B" (?e "$(3#}(B") (?u "$(3#~(B") (?i "$(3$!(B") (?a "$(3$"(B") (?E "$(3$#(B") (?o "$(3$%(B")
- (?W "$(3%c(B" (?e "$(3%3(B") (?u "$(3%c(B") (?i "$(3%C(B") (?a "$(3$&(B") (?E "$(3%S(B")))
-;;; H
- ("$(3!6(B" (?e "$(3!1(B") (?u "$(3!2(B") (?i "$(3!3(B") (?a "$(3!4(B") (?E "$(3!5(B") (?o "$(3!7(B")
- (?W "$(3!8(B" (?a "$(3!8(B")
- (?e "$(3!6%n(B") (?u "$(3!6%r(B") (?i "$(3!6%o(B") (?E "$(3!6%q(B")))
-;;; I
- ("$(3"h(B" (?2 "$(3#:(B"))
-;;; J
- ("$(3#j(B" (?e "$(3#e(B") (?u "$(3#f(B") (?i "$(3#g(B") (?a "$(3#h(B") (?E "$(3#i(B") (?o "$(3#k(B")
- (?W "$(3#l(B" (?a "$(3#l(B")
- (?e "$(3#j%n(B") (?u "$(3#j%r(B") (?i "$(3#j%o(B") (?E "$(3#j%q(B")))
-;;; K
- ("$(3#"(B" (?e "$(3"{(B") (?u "$(3"|(B") (?i "$(3"}(B") (?a "$(3"~(B") (?E "$(3#!(B") (?o "$(3##(B")
- (?W "$(3#*(B" (?e "$(3#%(B") (?u "$(3#*(B") (?i "$(3#'(B") (?a "$(3#((B") (?E "$(3#)(B")))
-;;; L
- ("$(3!.(B" (?e "$(3!)(B") (?u "$(3!*(B") (?i "$(3!+(B") (?a "$(3!,(B") (?E "$(3!-(B") (?o "$(3!/(B")
- (?W "$(3!0(B" (?a "$(3!0(B")
- (?e "$(3!.%n(B") (?u "$(3!.%r(B") (?i "$(3!.%o(B") (?E "$(3!.%q(B")))
-;;; M
- ("$(3!>(B" (?e "$(3!9(B") (?u "$(3!:(B") (?i "$(3!;(B") (?a "$(3!<(B") (?E "$(3!=(B") (?o "$(3!?(B")
- (?W "$(3%a(B" (?e "$(3%1(B") (?u "$(3%a(B") (?i "$(3%A(B") (?a "$(3!@(B") (?E "$(3%Q(B"))
- (?Y "$(3$_(B" (?a "$(3$_(B")))
-;;; N
- ("$(3"`(B" (?e "$(3"[(B") (?u "$(3"\(B") (?i "$(3"](B") (?a "$(3"^(B") (?E "$(3"_(B") (?o "$(3"a(B")
- (?W "$(3"b(B" (?a "$(3"b(B")
- (?e "$(3"`%n(B") (?u "$(3"`%r(B") (?i "$(3"`%o(B") (?E "$(3"`%q(B")))
-;;; O
- ("$(3"i(B" (?2 "$(3#;(B"))
-;;; P
- ("$(3$<(B" (?e "$(3$7(B") (?u "$(3$8(B") (?i "$(3$9(B") (?a "$(3$:(B") (?E "$(3$;(B") (?o "$(3$=(B")
- (?W "$(3$>(B" (?a "$(3$>(B")
- (?e "$(3$<%n(B") (?u "$(3$<%r(B") (?i "$(3$<%o(B") (?E "$(3$<%q(B")))
-;;; Q
- ("$(3!v(B" (?e "$(3!q(B") (?u "$(3!r(B") (?i "$(3!s(B") (?a "$(3!t(B") (?E "$(3!u(B") (?o "$(3!w(B")
- (?W "$(3!~(B" (?e "$(3!y(B") (?u "$(3!~(B") (?i "$(3!{(B") (?a "$(3!|(B") (?E "$(3!}(B")))
-;;; R
- ("$(3!N(B" (?e "$(3!I(B") (?u "$(3!J(B") (?i "$(3!K(B") (?a "$(3!L(B") (?E "$(3!M(B") (?o "$(3!O(B")
- (?W "$(3!P(B" (?a "$(3!P(B")
- (?e "$(3!N%n(B") (?u "$(3!N%r(B") (?i "$(3!N%o(B") (?E "$(3!N%q(B"))
- (?Y "$(3$`(B" (?a "$(3$`(B")))
-;;; S
- ("$(3$D(B" (?e "$(3$?(B") (?u "$(3$@(B") (?i "$(3$A(B") (?a "$(3$B(B") (?E "$(3$C(B") (?o "$(3$E(B")
- (?W "$(3$F(B" (?a "$(3$F(B")
- (?e "$(3$D%n(B") (?u "$(3$D%r(B") (?i "$(3$D%o(B") (?E "$(3$D%q(B"))
- (?2 "$(3$L(B"
- (?e "$(3$G(B") (?u "$(3$H(B") (?i "$(3$I(B") (?a "$(3$J(B") (?E "$(3$K(B") (?o "$(3$M(B")
- (?W "$(3$F(B" (?a "$(3$F(B")
- (?e "$(3$L%n(B") (?u "$(3$L%r(B") (?i "$(3$L%o(B") (?E "$(3$L%q(B"))))
-;;; T
- ("$(3$,(B" (?e "$(3$'(B") (?u "$(3$((B") (?i "$(3$)(B") (?a "$(3$*(B") (?E "$(3$+(B") (?o "$(3$-(B")
- (?W "$(3$.(B" (?a "$(3$.(B")
- (?e "$(3$,%n(B") (?u "$(3$,%r(B") (?i "$(3$,%o(B") (?E "$(3$,%q(B")))
-;;; U
- ("$(3"d(B" (?2 "$(3#6(B"))
-;;; V
- ("$(3"0(B" (?e "$(3"+(B") (?u "$(3",(B") (?i "$(3"-(B") (?a "$(3".(B") (?E "$(3"/(B") (?o "$(3"1(B")
- (?W "$(3"2(B" (?a "$(3"2(B")
- (?e "$(3"0%n(B") (?u "$(3"0%r(B") (?i "$(3"0%o(B") (?E "$(3"0%q(B")))
-;;; W
- ("$(3%r(B" (?e "$(3%n(B") (?u "$(3%r(B") (?i "$(3%o(B") (?a "$(3%p(B") (?E "$(3%q(B"))
-;;; X
- ("$(3%N(B" (?e "$(3%I(B") (?u "$(3%J(B") (?i "$(3%K(B") (?a "$(3%L(B") (?E "$(3%M(B") (?o "$(3%O(B"))
-;;; Y
- ("$(3#R(B" (?e "$(3#M(B") (?u "$(3#N(B") (?i "$(3#O(B") (?a "$(3#P(B") (?E "$(3#Q(B") (?o "$(3#S(B")
- (?W "$(3#T(B" (?a "$(3#T(B")
- (?e "$(3#R%n(B") (?u "$(3#R%r(B") (?i "$(3#R%o(B") (?E "$(3#R%q(B")))
-;;; Z
- ("$(3#J(B" (?e "$(3#E(B") (?u "$(3#F(B") (?i "$(3#G(B") (?a "$(3#H(B") (?E "$(3#I(B") (?o "$(3#K(B")
- (?W "$(3#L(B" (?a "$(3#L(B")
- (?e "$(3#J%n(B") (?u "$(3#J%r(B") (?i "$(3#J%o(B") (?E "$(3#J%q(B")))
-;;; [ \ ] ^ _
- nil nil nil nil nil
-;;; `
- (""
- (?: "$(3$h(B")
- (?? (if ethio-use-three-dot-question "$(3%x(B" "$(3$n(B"))
- (?! "$(3%t(B")
- (?e "$(3#5(B") (?u "$(3#6(B") (?U "$(3#6(B") (?i "$(3#7(B") (?a "$(3#8(B") (?A "$(3#8(B")
- (?E "$(3#9(B") (?I "$(3#:(B") (?o "$(3#;(B") (?O "$(3#;(B")
- (?g "$(3%^(B"
- (?e "$(3%Y(B") (?u "$(3%Z(B") (?i "$(3%[(B") (?a "$(3%\(B") (?E "$(3%](B") (?o "$(3%_(B"))
- (?h "$(3"H(B"
- (?e "$(3"C(B") (?u "$(3"D(B") (?i "$(3"E(B") (?a "$(3"F(B") (?E "$(3"G(B") (?o "$(3"I(B")
- (?W "$(3"P(B" (?e "$(3"K(B") (?u "$(3"P(B") (?i "$(3"M(B") (?a "$(3"N(B") (?E "$(3"O(B")))
- (?k "$(3%>(B"
- (?e "$(3%9(B") (?u "$(3%:(B") (?i "$(3%;(B") (?a "$(3%<(B") (?E "$(3%=(B") (?o "$(3%?(B"))
- (?s "$(3!F(B"
- (?e "$(3!A(B") (?u "$(3!B(B") (?i "$(3!C(B") (?a "$(3!D(B") (?E "$(3!E(B") (?o "$(3!G(B")
- (?W "$(3!H(B" (?a "$(3!H(B")
- (?e "$(3!F%n(B") (?u "$(3!F%r(B") (?i "$(3!F%o(B") (?E "$(3!F%q(B")))
- (?S "$(3$L(B"
- (?e "$(3$G(B") (?u "$(3$H(B") (?i "$(3$I(B") (?a "$(3$J(B") (?E "$(3$K(B") (?o "$(3$M(B")
- (?W "$(3$F(B" (?a "$(3$F(B")
- (?e "$(3$L%n(B") (?u "$(3$L%r(B") (?i "$(3$L%o(B") (?E "$(3$L%q(B")))
- (?q "$(3%.(B" (?e "$(3%)(B") (?u "$(3%*(B") (?i "$(3%+(B") (?a "$(3%,(B") (?E "$(3%-(B") (?o "$(3%/(B")))
-;;; a
- ("$(3"f(B" (?2 "$(3#8(B"))
-;;; b
- ("$(3"((B" (?e "$(3"#(B") (?u "$(3"$(B") (?i "$(3"%(B") (?a "$(3"&(B") (?E "$(3"'(B") (?o "$(3")(B")
- (?W "$(3%b(B" (?e "$(3%2(B") (?u "$(3%b(B") (?i "$(3%B(B") (?a "$(3"*(B") (?E "$(3%R(B")))
-;;; c
- ("$(3"@(B" (?e "$(3";(B") (?u "$(3"<(B") (?i "$(3"=(B") (?a "$(3">(B") (?E "$(3"?(B") (?o "$(3"A(B")
- (?W "$(3"B(B" (?a "$(3"B(B")
- (?e "$(3"@%n(B") (?u "$(3"@%r(B") (?i "$(3"@%o(B") (?E "$(3"@%q(B")))
-;;; d
- ("$(3#Z(B" (?e "$(3#U(B") (?u "$(3#V(B") (?i "$(3#W(B") (?a "$(3#X(B") (?E "$(3#Y(B") (?o "$(3#[(B")
- (?W "$(3#\(B" (?a "$(3#\(B")
- (?e "$(3#Z%o(B") (?u "$(3#Z%r(B") (?i "$(3#Z%p(B") (?E "$(3#Z%q(B")))
-;;; e
- ("$(3"c(B" (?2 "$(3#5(B") (?a "$(3"j(B"))
-;;; f
- ("$(3$T(B" (?e "$(3$O(B") (?u "$(3$P(B") (?i "$(3$Q(B") (?a "$(3$R(B") (?E "$(3$S(B") (?o "$(3$U(B")
- (?W "$(3%d(B" (?e "$(3%4(B") (?u "$(3%d(B") (?i "$(3%D(B") (?a "$(3$V(B") (?E "$(3%T(B"))
- (?Y "$(3$a(B" (?a "$(3$a(B")))
-;;; g
- ("$(3#r(B" (?e "$(3#m(B") (?u "$(3#n(B") (?i "$(3#o(B") (?a "$(3#p(B") (?E "$(3#q(B") (?o "$(3#s(B")
- (?W "$(3#z(B" (?e "$(3#u(B") (?u "$(3#z(B") (?i "$(3#w(B") (?a "$(3#x(B") (?E "$(3#y(B"))
- (?2 "$(3%^(B" (?e "$(3%Y(B") (?u "$(3%Z(B") (?i "$(3%[(B") (?a "$(3%\(B") (?E "$(3%](B") (?o "$(3%_(B")))
-;;; h
- ("$(3!&(B" (?e "$(3!!(B") (?u "$(3!"(B") (?i "$(3!#(B") (?a "$(3!$(B") (?E "$(3!%(B") (?o "$(3!'(B")
- (?W "$(3"P(B" (?e "$(3"K(B") (?u "$(3"P(B") (?i "$(3"M(B") (?a "$(3"N(B") (?E "$(3"O(B"))
- (?2 "$(3"H(B" (?e "$(3"C(B") (?u "$(3"D(B") (?i "$(3"E(B") (?a "$(3"F(B") (?E "$(3"G(B") (?o "$(3"I(B")
- (?W "$(3"P(B" (?e "$(3"K(B") (?u "$(3"P(B") (?i "$(3"M(B") (?a "$(3"N(B") (?E "$(3"O(B"))))
-;;; i
- ("$(3"e(B" (?2 "$(3#7(B"))
-;;; j
- ("$(3#j(B" (?e "$(3#e(B") (?u "$(3#f(B") (?i "$(3#g(B") (?a "$(3#h(B") (?E "$(3#i(B") (?o "$(3#k(B")
- (?W "$(3#l(B" (?a "$(3#l(B")
- (?e "$(3#j%n(B") (?u "$(3#j%r(B") (?i "$(3#j%o(B") (?E "$(3#j%q(B")))
-;;; k
- ("$(3"p(B" (?e "$(3"k(B") (?u "$(3"l(B") (?i "$(3"m(B") (?a "$(3"n(B") (?E "$(3"o(B") (?o "$(3"q(B")
- (?W "$(3"x(B" (?e "$(3"s(B") (?u "$(3"x(B") (?i "$(3"u(B") (?a "$(3"v(B") (?E "$(3"w(B"))
- (?2 "$(3%>(B" (?e "$(3%9(B") (?u "$(3%:(B") (?i "$(3%;(B") (?a "$(3%<(B") (?E "$(3%=(B") (?o "$(3%?(B")))
-;;; l
- ("$(3!.(B" (?e "$(3!)(B") (?u "$(3!*(B") (?i "$(3!+(B") (?a "$(3!,(B") (?E "$(3!-(B") (?o "$(3!/(B")
- (?W "$(3!0(B" (?a "$(3!0(B")
- (?e "$(3!.%n(B") (?u "$(3!.%r(B") (?i "$(3!.%o(B") (?E "$(3!.%q(B")))
-;;; m
- ("$(3!>(B" (?e "$(3!9(B") (?u "$(3!:(B") (?i "$(3!;(B") (?a "$(3!<(B") (?E "$(3!=(B") (?o "$(3!?(B")
- (?W "$(3%a(B" (?e "$(3%1(B") (?u "$(3%a(B") (?i "$(3%A(B") (?a "$(3!@(B") (?E "$(3%Q(B"))
- (?Y "$(3$_(B" (?a "$(3$_(B")))
-;;; n
- ("$(3"X(B" (?e "$(3"S(B") (?u "$(3"T(B") (?i "$(3"U(B") (?a "$(3"V(B") (?E "$(3"W(B") (?o "$(3"Y(B")
- (?W "$(3"Z(B" (?a "$(3"Z(B")
- (?e "$(3"X%n(B") (?u "$(3"X%r(B") (?i "$(3"X%o(B") (?E "$(3"X%q(B")))
-;;; o
- ("$(3"i(B" (?2 "$(3#;(B"))
-;;; p
- ("$(3$\(B" (?e "$(3$W(B") (?u "$(3$X(B") (?i "$(3$Y(B") (?a "$(3$Z(B") (?E "$(3$[(B") (?o "$(3$](B")
- (?W "$(3%e(B" (?e "$(3%5(B") (?u "$(3%e(B") (?i "$(3%E(B") (?a "$(3$^(B") (?E "$(3%U(B")))
-;;; q
- ("$(3!f(B" (?e "$(3!a(B") (?u "$(3!b(B") (?i "$(3!c(B") (?a "$(3!d(B") (?E "$(3!e(B") (?o "$(3!g(B")
- (?W "$(3!n(B" (?e "$(3!i(B") (?u "$(3!n(B") (?i "$(3!k(B") (?a "$(3!l(B") (?E "$(3!m(B"))
- (?2 "$(3%.(B" (?e "$(3%)(B") (?u "$(3%*(B") (?i "$(3%+(B") (?a "$(3%,(B") (?E "$(3%-(B") (?o "$(3%/(B")))
-;;; r
- ("$(3!N(B" (?e "$(3!I(B") (?u "$(3!J(B") (?i "$(3!K(B") (?a "$(3!L(B") (?E "$(3!M(B") (?o "$(3!O(B")
- (?W "$(3!P(B" (?a "$(3!P(B")
- (?e "$(3!N%n(B") (?u "$(3!N%r(B") (?i "$(3!N%o(B") (?E "$(3!N%q(B"))
- (?Y "$(3$`(B" (?a "$(3$`(B")))
-;;; s
- ("$(3!V(B" (?e "$(3!Q(B") (?u "$(3!R(B") (?i "$(3!S(B") (?a "$(3!T(B") (?E "$(3!U(B") (?o "$(3!W(B")
- (?W "$(3!X(B" (?a "$(3!X(B")
- (?e "$(3!V%n(B") (?u "$(3!V%r(B") (?i "$(3!V%o(B") (?E "$(3!V%q(B"))
- (?2 "$(3!F(B" (?e "$(3!A(B") (?u "$(3!B(B") (?i "$(3!C(B") (?a "$(3!D(B") (?E "$(3!E(B") (?o "$(3!G(B")
- (?W "$(3!H(B" (?a "$(3!H(B")
- (?e "$(3!F%n(B") (?u "$(3!F%r(B") (?i "$(3!F%o(B") (?E "$(3!F%q(B"))))
-;;; t
- ("$(3"8(B" (?e "$(3"3(B") (?u "$(3"4(B") (?i "$(3"5(B") (?a "$(3"6(B") (?E "$(3"7(B") (?o "$(3"9(B")
- (?W "$(3":(B" (?a "$(3":(B")
- (?e "$(3"8%n(B") (?u "$(3"8%r(B") (?i "$(3"8%o(B") (?E "$(3"8%q(B")))
-;;; u
- ("$(3"d(B" (?2 "$(3#6(B"))
-;;; v
- ("$(3"0(B" (?e "$(3"+(B") (?u "$(3",(B") (?i "$(3"-(B") (?a "$(3".(B") (?E "$(3"/(B") (?o "$(3"1(B")
- (?W "$(3"2(B" (?a "$(3"2(B")
- (?e "$(3"0%n(B") (?u "$(3"0%r(B") (?i "$(3"0%o(B") (?E "$(3"0%q(B")))
-;;; w
- ("$(3#2(B" (?e "$(3#-(B") (?u "$(3#.(B") (?i "$(3#/(B") (?a "$(3#0(B") (?E "$(3#1(B") (?o "$(3#3(B")
- (?W "$(3%p(B" (?e "$(3%n(B") (?u "$(3%r(B") (?i "$(3%o(B") (?a "$(3%p(B") (?E "$(3%q(B")))
-;;; x
- ("$(3!^(B" (?e "$(3!Y(B") (?u "$(3!Z(B") (?i "$(3![(B") (?a "$(3!\(B") (?E "$(3!](B") (?o "$(3!_(B")
- (?W "$(3!`(B" (?a "$(3!`(B")
- (?e "$(3!^%n(B") (?u "$(3!^%r(B") (?i "$(3!^%o(B") (?E "$(3!^%q(B")))
-;;; y
- ("$(3#R(B" (?e "$(3#M(B") (?u "$(3#N(B") (?i "$(3#O(B") (?a "$(3#P(B") (?E "$(3#Q(B") (?o "$(3#S(B")
- (?W "$(3#T(B" (?a "$(3#T(B")
- (?e "$(3#R%n(B") (?u "$(3#R%r(B") (?i "$(3#R%o(B") (?E "$(3#R%q(B")))
-;;; z
- ("$(3#B(B" (?e "$(3#=(B") (?u "$(3#>(B") (?i "$(3#?(B") (?a "$(3#@(B") (?E "$(3#A(B") (?o "$(3#C(B")
- (?W "$(3#D(B" (?a "$(3#D(B")
- (?e "$(3#B%n(B") (?u "$(3#B%r(B") (?i "$(3#B%o(B") (?E "$(3#B%q(B")))
-;;; { | } ~ DEL
- nil nil nil nil nil
- ])
-
-;; To avoid byte-compiler warnings. It should never be set globally.
-(defvar ethio-sera-being-called-by-w3)
-;; This variable will be bound by some third-party package.
-(defvar sera-being-called-by-w3)
-
;;;###autoload
-(defun ethio-sera-to-fidel-region (beg end &optional secondary force)
- "Convert the characters in region from SERA to FIDEL.
-The variable `ethio-primary-language' specifies the primary language
-and `ethio-secondary-language' specifies the secondary.
+(defun ethio-sera-to-fidel-buffer (&optional secondary force)
+ "Convert the current buffer from SERA to FIDEL.
+
+The variable `ethio-primary-language' specifies the primary
+language and `ethio-secondary-language' specifies the secondary.
-If the 3rd parameter SECONDARY is given and non-nil, assume the region
-begins with the secondary language; otherwise with the primary
-language.
+If the 1st optional argument SECONDARY is non-nil, assume the
+buffer begins with the secondary language; otherwise with the
+primary language.
-If the 4th parameter FORCE is given and non-nil, perform conversion
+If the 2nd optional argument FORCE is non-nil, perform conversion
even if the buffer is read-only.
See also the descriptions of the variables
-`ethio-use-colon-for-colon' and
-`ethio-use-three-dot-question'."
+`ethio-use-colon-for-colon' and `ethio-use-three-dot-question'."
- (interactive "r\nP")
- (save-restriction
- (narrow-to-region beg end)
- (ethio-sera-to-fidel-buffer secondary force)))
+ (interactive "P")
+ (ethio-sera-to-fidel-region (point-min) (point-max) secondary force))
+
+;; To avoid byte-compiler warnings. It should never be set globally.
+(defvar ethio-sera-being-called-by-w3)
+;; This variable will be bound by some third-party package.
+(defvar sera-being-called-by-w3)
;;;###autoload
-(defun ethio-sera-to-fidel-buffer (&optional secondary force)
- "Convert the current buffer from SERA to FIDEL.
+(defun ethio-sera-to-fidel-region (begin end &optional secondary force)
+ "Convert the characters in region from SERA to FIDEL.
The variable `ethio-primary-language' specifies the primary
language and `ethio-secondary-language' specifies the secondary.
-If the 1st optional parameter SECONDARY is non-nil, assume the buffer
-begins with the secondary language; otherwise with the primary
-language.
+If the 3rd argument SECONDARY is given and non-nil, assume the
+region begins with the secondary language; otherwise with the
+primary language.
-If the 2nd optional parametr FORCE is non-nil, perform conversion even if the
-buffer is read-only.
+If the 4th argument FORCE is given and non-nil, perform
+conversion even if the buffer is read-only.
See also the descriptions of the variables
-`ethio-use-colon-for-colon' and
-`ethio-use-three-dot-question'."
-
- (interactive "P")
+`ethio-use-colon-for-colon' and `ethio-use-three-dot-question'."
+ (interactive "r\nP")
(if (and buffer-read-only
(not force)
(not (y-or-n-p "Buffer is read-only. Force to convert? ")))
@@ -477,219 +237,165 @@ See also the descriptions of the variables
(let ((ethio-primary-language ethio-primary-language)
(ethio-secondary-language ethio-secondary-language)
- (ethio-use-colon-for-colon ethio-use-colon-for-colon)
- (ethio-use-three-dot-question ethio-use-three-dot-question)
- ;; The above four variables may be changed temporary
- ;; by tilde escapes during conversion. So we bind them to other
- ;; variables but of the same names.
+ ;; The above two variables may be changed temporarily by tilde
+ ;; escapes during conversion. We bind them to the variables
+ ;; of the same names so that the original values are restored
+ ;; when this function exits.
(buffer-read-only nil)
- (case-fold-search nil)
- current-language
- next-language)
+ (lang (if secondary ethio-secondary-language ethio-primary-language))
+ ret)
- (setq current-language
- (if secondary
- ethio-secondary-language
- ethio-primary-language))
+ (ethio-use-colon-for-colon ethio-use-colon-for-colon)
+ (ethio-use-three-dot-question ethio-use-three-dot-question)
- (goto-char (point-min))
-
- (while (not (eobp))
- (setq next-language
- (cond
- ((eq current-language 'english)
- (ethio-sera-to-fidel-english))
- ((eq current-language 'amharic)
- (ethio-sera-to-fidel-ethio 'amharic))
- ((eq current-language 'tigrigna)
- (ethio-sera-to-fidel-ethio 'tigrigna))
- (t ; we don't know what to do
- (ethio-sera-to-fidel-english))))
-
- (setq current-language
- (cond
-
- ;; when language tag is explicitly specified
- ((not (eq next-language 'toggle))
- next-language)
-
- ;; found a toggle in a primary language section
- ((eq current-language ethio-primary-language)
- ethio-secondary-language)
-
- ;; found a toggle in a secondary, third, fourth, ...
- ;; language section
- (t
- ethio-primary-language))))
-
- ;; If ethio-implicit-period-conversion is non-nil, the
- ;; Ethiopic dot "$(3%u(B" at the end of an Ethiopic sentence is
- ;; replaced with the Ethiopic full stop "$(3$i(B".
- (if ethio-implicit-period-conversion
- (progn
- (goto-char (point-min))
- (while (re-search-forward "\\([$(3!!(B-$(3$a%)(B-$(3%e%n(B-$(3%r%s(B]\\)$(3%u(B\\([ \t]\\)"
- nil t)
- (replace-match "\\1$(3$i(B\\2"))
- (goto-char (point-min))
- (while (re-search-forward "\\([$(3!!(B-$(3$a%)(B-$(3%e%n(B-$(3%r%s(B]\\)$(3%u(B$" nil t)
- (replace-match "\\1$(3$i(B"))))
-
- ;; gemination
- (goto-char (point-min))
- (while (re-search-forward "\\ce$(3%s(B" nil 0)
- (compose-region
- (save-excursion (backward-char 2) (point))
- (point)))
- ))
-
-(defun ethio-sera-to-fidel-english nil
- "Handle English section in SERA to FIDEL conversion.
-Conversion stops when a language switch is found. Then delete that
-switch and return the name of the new language as a symbol."
- (let ((new-language nil))
-
- (while (and (not (eobp)) (null new-language))
- (cond
-
- ;; if no more "\", nothing to do.
- ((not (search-forward "\\" nil 0)))
-
- ;; hereafter point is put after a "\".
- ;; first delete that "\", then check the following chars
-
- ;; "\\" : leave the second "\"
- ((progn
- (delete-backward-char 1)
- (= (following-char) ?\\ ))
- (forward-char 1))
-
- ;; "\ " : delete the following " "
- ((= (following-char) 32)
- (delete-char 1)
- (setq new-language 'toggle))
-
- ;; a language flag
- ((setq new-language (ethio-process-language-flag)))
-
- ;; just a "\" : not special sequence.
- (t
- (setq new-language 'toggle))))
+ (save-restriction
+ (narrow-to-region begin end)
+ (goto-char (point-min))
+ (while (not (eobp))
+ (setq ret
+ (cond
+ ((eq lang 'amharic)
+ (ethio-prefer-amharic t)
+ (ethio-sera-to-fidel-region-ethio 'amharic))
+ ((eq lang 'tigrigna)
+ (ethio-prefer-amharic nil)
+ (ethio-sera-to-fidel-region-ethio 'tigrigna))
+ (t
+ (ethio-sera-to-fidel-region-noethio))))
+ (setq lang
+ (if (eq ret 'toggle)
+ (if (eq lang ethio-primary-language)
+ ethio-secondary-language
+ ethio-primary-language)
+ ret)))))
+
+ ;; Restore user's preference.
+ (ethio-adjust-robin))
+
+(defun ethio-sera-to-fidel-region-noethio ()
+ "Return next language as symbol: amharic, tigrigna, toggle or nil."
+ (let (lflag)
+ (cond
- new-language))
+ ;; No more "\", i.e. nothing to do.
+ ((not (search-forward "\\" nil 0))
+ nil)
-(defun ethio-sera-to-fidel-ethio (lang)
- "Handle Ethiopic section in SERA to FIDEL conversion.
-Conversion stops when a language switch is found. Then delete that
-switch and return the name of the new language as a symbol.
+ ;; Hereafter point is put after a "\".
+ ;; First delete that "\", then check the following chars.
-The parameter LANG (symbol, either `amharic' or `tigrigna') affects
-the conversion of \"a\"."
+ ;; A language flag.
+ ((progn (delete-char -1) (setq lflag (ethio-process-language-flag)))
+ lflag)
- (let ((new-language nil)
- (verbatim nil)
- start table table2 ch)
+ ;; "\\" : leave the second "\" and continue in the same language.
+ ((= (following-char) ?\\)
+ (forward-char 1)
+ nil)
- (setcar (aref ethio-sera-to-fidel-table ?a)
- (if (eq lang 'tigrigna) "$(3"f(B" "$(3"c(B"))
+ ;; "\ " : delete the following " " and toggle the language.
+ ((= (following-char) 32)
+ (delete-char 1)
+ 'toggle)
- (while (and (not (eobp)) (null new-language))
- (setq ch (following-char))
- (cond
+ ;; A "\" but not a special sequence: simply toggle the language.
+ (t
+ 'toggle))))
- ;; skip from "<" to ">" (or from "&" to ";") if in w3-mode
- ((and (or (= ch ?<) (= ch ?&))
- (or (and (boundp 'ethio-sera-being-called-by-w3)
- ethio-sera-being-called-by-w3)
- (and (boundp 'sera-being-called-by-w3)
- sera-being-called-by-w3)))
- (search-forward (if (= ch ?<) ">" ";")
- nil 0))
-
- ;; leave non-ASCII characters as they are
- ((>= ch 128)
+(defun ethio-sera-to-fidel-region-ethio (lang)
+ "Return next language as symbol: amharic, tigrigna, toggle or nil."
+ (save-restriction
+ (narrow-to-region
+ (point)
+ (if (re-search-forward "\\(`[1-9][0-9]*\\)\\|[\\<&]" nil t)
+ (match-beginning 0)
+ (point-max)))
+ (robin-convert-region (point-min) (point-max) "ethiopic-sera")
+ (goto-char (point-max)))
+
+ (let (lflag)
+ (cond
+ ((= (following-char) ?`)
+ (delete-char 1)
+ (ethio-process-digits)
+ lang)
+
+ ((looking-at "[<&]")
+ (if (or (and (boundp 'ethio-sera-being-called-by-w3)
+ ethio-sera-being-called-by-w3)
+ (and (boundp 'sera-being-called-by-w3)
+ sera-being-called-by-w3))
+ (search-forward (if (= (following-char) ?<) ">" ";") nil 0)
(forward-char 1))
+ lang)
- ;; ethiopic digits
- ((looking-at "`[1-9][0-9]*")
- (delete-char 1)
- (ethio-convert-digit))
+ ((eobp)
+ nil)
- ;; if not seeing a "\", do sera to fidel conversion
- ((/= ch ?\\ )
- (setq start (point))
- (forward-char 1)
- (setq table (aref ethio-sera-to-fidel-table ch))
- (while (setq table2 (cdr (assoc (following-char) table)))
- (setq table table2)
- (forward-char 1))
- (if (setq ch (car table))
- (progn
- (delete-region start (point))
- (if (stringp ch)
- (insert ch)
- (insert (eval ch))))))
+ ;; Now we must be looking at a "\".
+ ;; First delete that "\", then check the following chars.
- ;; if control reaches here, we must be looking at a "\"
+ ((progn (delete-char 1) (= (following-char) 32))
+ (delete-char 1)
+ 'toggle)
- ;; verbatim mode
- (verbatim
- (if (looking-at "\\\\~! ?")
+ ((looking-at "[,.;:'`?\\]+")
+ (goto-char (match-end 0))
+ lang)
- ;; "\~!" or "\~! ". switch to non-verbatim mode
- (progn
- (replace-match "")
- (setq verbatim nil))
+ ((/= (following-char) ?~)
+ 'toggle)
- ;; "\" but not "\~!" nor "\~! ". skip the current "\".
- (forward-char 1)))
+ ;; Now we must be looking at a "~".
- ;; hereafter, non-verbatim mode and looking at a "\"
- ;; first delete that "\", then check the following chars.
+ ((setq lflag (ethio-process-language-flag))
+ lflag)
- ;; "\ " : delete the following " "
- ((progn
- (delete-char 1)
- (setq ch (following-char))
- (= ch 32))
- (delete-char 1)
- (setq new-language 'toggle))
+ ;; Delete the following "~" and check the following chars.
- ;; "\~!" or "\~! " : switch to verbatim mode
- ((looking-at "~! ?")
- (replace-match "")
- (setq verbatim t))
+ ((progn (delete-char 1) (looking-at "! ?"))
+ (replace-match "")
+ (if (re-search-forward "\\\\~! ?" nil 0)
+ (replace-match ""))
+ lang)
- ;; a language flag
- ((setq new-language (ethio-process-language-flag)))
+ ((looking-at "-: ?")
+ (replace-match "")
+ (ethio-use-colon-for-colon t)
+ lang)
- ;; "\~" but not "\~!" nor a language flag
- ((= ch ?~)
- (delete-char 1)
- (ethio-tilde-escape))
+ ((looking-at "`: ?")
+ (replace-match "")
+ (ethio-use-colon-for-colon nil)
+ lang)
- ;; ASCII punctuation escape. skip
- ((looking-at "\\(,\\|\\.\\|;\\|:\\|'\\|`\\|\?\\|\\\\\\)+")
- (goto-char (match-end 0)))
+ ((looking-at "`| ?")
+ (replace-match "")
+ (ethio-use-three-dot-question t)
+ lang)
- ;; "\", but not special sequence
- (t
- (setq new-language 'toggle))))
+ ((looking-at "\\? ?")
+ (replace-match "")
+ (ethio-use-three-dot-question nil)
+ lang)
- new-language))
+ ;; Unknown tilde escape. Recover the deleted chars.
+ (t
+ (insert "\\~")
+ lang))))
(defun ethio-process-language-flag nil
"Process a language flag of the form \"~lang\" or \"~lang1~lang2\".
If looking at \"~lang1~lang2\", set `ethio-primary-language' and
-`ethio-une-secondary-language' based on \"lang1\" and \"lang2\".
+`ethio-secondary-language' based on \"lang1\" and \"lang2\".
Then delete the language flag \"~lang1~lang2\" from the buffer.
Return value is the new primary language.
-If looking at \"~lang\", delete that language flag \"~lang\" from the
-buffer and return that language. In this case
-`ethio-primary-language' and `ethio-uni-secondary-language'
-are left unchanged.
+If looking at \"~lang\", delete that language flag \"~lang\" from
+the buffer and return that language. In this case
+`ethio-primary-language' and `ethio-secondary-language' are left
+unchanged.
If an unsupported language flag is found, just return nil without
changing anything."
@@ -700,12 +406,8 @@ changing anything."
;; ~lang1~lang2
((and (looking-at
"~\\([a-z][a-z][a-z]?\\)~\\([a-z][a-z][a-z]?\\)[ \t\n\\]")
- (setq lang1
- (ethio-flag-to-language
- (buffer-substring (match-beginning 1) (match-end 1))))
- (setq lang2
- (ethio-flag-to-language
- (buffer-substring (match-beginning 2) (match-end 2)))))
+ (setq lang1 (ethio-flag-to-language (match-string 1)))
+ (setq lang2 (ethio-flag-to-language (match-string 2))))
(setq ethio-primary-language lang1
ethio-secondary-language lang2)
(delete-region (point) (match-end 2))
@@ -715,9 +417,7 @@ changing anything."
;; ~lang
((and (looking-at "~\\([a-z][a-z][a-z]?\\)[ \t\n\\]")
- (setq lang1
- (ethio-flag-to-language
- (buffer-substring (match-beginning 1) (match-end 1)))))
+ (setq lang1 (ethio-flag-to-language (match-string 1))))
(delete-region (point) (match-end 1))
(if (= (following-char) 32)
(delete-char 1))
@@ -727,59 +427,6 @@ changing anything."
(t
nil))))
-(defun ethio-tilde-escape nil
- "Handle a SERA tilde escape in Ethiopic section and delete it.
-Delete the escape even it is not recognized."
-
- (let ((p (point)) command)
- (skip-chars-forward "^ \t\n\\\\")
- (setq command (buffer-substring p (point)))
- (delete-region p (point))
- (if (= (following-char) 32)
- (delete-char 1))
-
- (cond
-
- ;; \~-:
- ((string= command "-:")
- (setq ethio-use-colon-for-colon t))
-
- ;; \~`:
- ((string= command "`:")
- (setq ethio-use-colon-for-colon nil))
-
- ;; \~?
- ((string= command "?")
- (setq ethio-use-three-dot-question nil))
-
- ;; \~`|
- ((string= command "`|")
- (setq ethio-use-three-dot-question t))
-
- ;; \~e
- ((string= command "e")
- (insert "$(3%j(B"))
-
- ;; \~E
- ((string= command "E")
- (insert "$(3%k(B"))
-
- ;; \~a
- ((string= command "a")
- (insert "$(3%l(B"))
-
- ;; \~A
- ((string= command "A")
- (insert "$(3%m(B"))
-
- ;; \~X
- ((string= command "X")
- (insert "$(3%i(B"))
-
- ;; unsupported tilde escape
- (t
- nil))))
-
(defun ethio-flag-to-language (flag)
(cond
((or (string= flag "en") (string= flag "eng")) 'english)
@@ -787,7 +434,7 @@ Delete the escape even it is not recognized."
((or (string= flag "am") (string= flag "amh")) 'amharic)
(t nil)))
-(defun ethio-convert-digit nil
+(defun ethio-process-digits nil
"Convert Arabic digits to Ethiopic digits."
(let (ch z)
(while (and (>= (setq ch (following-char)) ?1)
@@ -804,97 +451,23 @@ Delete the escape even it is not recognized."
;; first digit is 10, 20, ..., or 90
((= (mod z 2) 1)
- (insert (aref [?$(3$y(B ?$(3$z(B ?$(3${(B ?$(3$|(B ?$(3$}(B ?$(3$~(B ?$(3%!(B ?$(3%"(B ?$(3%#(B] (- ch ?1)))
+ (insert (aref [?á² ?á³ ?á´ ?áµ ?ᶠ?á· ?Ḡ?á¹ ?áº] (- ch ?1)))
(setq z (1- z)))
;; first digit is 2, 3, ..., or 9
((/= ch ?1)
- (insert (aref [?$(3$q(B ?$(3$r(B ?$(3$s(B ?$(3$t(B ?$(3$u(B ?$(3$v(B ?$(3$w(B ?$(3$x(B] (- ch ?2))))
+ (insert (aref [?᪠?á« ?ᬠ?á­ ?á® ?ᯠ?á° ?á±] (- ch ?2))))
;; single 1
((= z 0)
- (insert "$(3$p(B")))
+ (insert "á©")))
;; 100
(if (= (mod z 4) 2)
- (insert "$(3%$(B"))
+ (insert "á»"))
;; 10000
- (insert-char ?$(3%%(B (/ z 4)))))
-
-;;;###autoload
-(defun ethio-sera-to-fidel-mail-or-marker (&optional arg)
- "Execute `ethio-sera-to-fidel-mail' or `ethio-sera-to-fidel-marker' depending on the current major mode.
-If in rmail-mode or in mail-mode, execute the former; otherwise latter."
-
- (interactive "P")
- (if (or (eq major-mode 'rmail-mode)
- (eq major-mode 'mail-mode))
- (ethio-sera-to-fidel-mail (prefix-numeric-value arg))
- (ethio-sera-to-fidel-marker arg)))
-
-;;;###autoload
-(defun ethio-sera-to-fidel-mail (&optional arg)
- "Convert SERA to FIDEL to read/write mail and news.
-
-If the buffer contains the markers \"<sera>\" and \"</sera>\",
-convert the segments between them into FIDEL.
-
-If invoked interactively and there is no marker, convert the subject field
-and the body into FIDEL using `ethio-sera-to-fidel-region'."
-
- (interactive "p")
- (let ((buffer-read-only nil)
- border)
- (save-excursion
-
- ;; follow RFC822 rules instead of looking for a fixed separator
- (rfc822-goto-eoh)
- (forward-line 1)
- (setq border (point))
-
- ;; note that the point is placed at the border
- (if (or (re-search-forward "^<sera>$" nil t)
- (progn
- (goto-char (point-min))
- (re-search-forward "^Subject: <sera>" border t)))
-
- ;; there are markers
- (progn
- ;; we start with the body so that the border will not change
- ;; use "^<sera>\n" instead of "^<sera>$" not to leave a blank line
- (goto-char border)
- (while (re-search-forward "^<sera>\n" nil t)
- (replace-match "")
- (ethio-sera-to-fidel-region
- (point)
- (progn
- (if (re-search-forward "^</sera>\n" nil 0)
- (replace-match ""))
- (point))))
- ;; now process the subject
- (goto-char (point-min))
- (if (re-search-forward "^Subject: <sera>" border t)
- (ethio-sera-to-fidel-region
- (progn (delete-backward-char 6) (point))
- (progn
- (if (re-search-forward "</sera>$" (line-end-position) 0)
- (replace-match ""))
- (point)))))
-
- ;; in case there are no marks but invoked interactively
- (if arg
- (progn
- (ethio-sera-to-fidel-region border (point-max))
- (goto-char (point-min))
- (if (re-search-forward "^Subject: " border t)
- (ethio-sera-to-fidel-region (point) (line-end-position))))))
-
- ;; adjust the rmail marker
- (if (eq major-mode 'rmail-mode)
- (set-marker
- (aref rmail-message-vector (1+ rmail-current-message))
- (point-max))))))
+ (insert-char ?á¼ (/ z 4)))))
;;;###autoload
(defun ethio-sera-to-fidel-marker (&optional force)
@@ -908,10 +481,10 @@ The markers \"<sera>\" and \"</sera>\" themselves are not deleted."
(error ""))
(save-excursion
(goto-char (point-min))
- (while (re-search-forward "<sera>" nil t)
+ (while (search-forward "<sera>" nil t)
(ethio-sera-to-fidel-region
(point)
- (if (re-search-forward "</sera>" nil t)
+ (if (search-forward "</sera>" nil t)
(match-beginning 0)
(point-max))
nil
@@ -921,71 +494,6 @@ The markers \"<sera>\" and \"</sera>\" themselves are not deleted."
;; FIDEL to SERA
;;
-(defconst ethio-fidel-to-sera-map
- [ "he" "hu" "hi" "ha" "hE" "h" "ho" "" ;; 0 - 7
- "le" "lu" "li" "la" "lE" "l" "lo" "lWa" ;; 8
- "He" "Hu" "Hi" "Ha" "HE" "H" "Ho" "HWa" ;; 16
- "me" "mu" "mi" "ma" "mE" "m" "mo" "mWa" ;; 24
- "`se" "`su" "`si" "`sa" "`sE" "`s" "`so" "`sWa" ;; 32
- "re" "ru" "ri" "ra" "rE" "r" "ro" "rWa" ;; 40
- "se" "su" "si" "sa" "sE" "s" "so" "sWa" ;; 48
- "xe" "xu" "xi" "xa" "xE" "x" "xo" "xWa" ;; 56
- "qe" "qu" "qi" "qa" "qE" "q" "qo" "" ;; 64
- "qWe" "" "qWi" "qWa" "qWE" "qW'" "" "" ;; 72
- "Qe" "Qu" "Qi" "Qa" "QE" "Q" "Qo" "" ;; 80
- "QWe" "" "QWi" "QWa" "QWE" "QW'" "" "" ;; 88
- "be" "bu" "bi" "ba" "bE" "b" "bo" "bWa" ;; 96
- "ve" "vu" "vi" "va" "vE" "v" "vo" "vWa" ;; 104
- "te" "tu" "ti" "ta" "tE" "t" "to" "tWa" ;; 112
- "ce" "cu" "ci" "ca" "cE" "c" "co" "cWa" ;; 120
- "`he" "`hu" "`hi" "`ha" "`hE" "`h" "`ho" "" ;; 128
- "hWe" "" "hWi" "hWa" "hWE" "hW'" "" "" ;; 136
- "ne" "nu" "ni" "na" "nE" "n" "no" "nWa" ;; 144
- "Ne" "Nu" "Ni" "Na" "NE" "N" "No" "NWa" ;; 152
- "e" "u" "i" "A" "E" "I" "o" "ea" ;; 160
- "ke" "ku" "ki" "ka" "kE" "k" "ko" "" ;; 168
- "kWe" "" "kWi" "kWa" "kWE" "kW'" "" "" ;; 176
- "Ke" "Ku" "Ki" "Ka" "KE" "K" "Ko" "" ;; 184
- "KWe" "" "KWi" "KWa" "KWE" "KW'" "" "" ;; 192
- "we" "wu" "wi" "wa" "wE" "w" "wo" "" ;; 200
- "`e" "`u" "`i" "`a" "`E" "`I" "`o" "" ;; 208
- "ze" "zu" "zi" "za" "zE" "z" "zo" "zWa" ;; 216
- "Ze" "Zu" "Zi" "Za" "ZE" "Z" "Zo" "ZWa" ;; 224
- "ye" "yu" "yi" "ya" "yE" "y" "yo" "yWa" ;; 232
- "de" "du" "di" "da" "dE" "d" "do" "dWa" ;; 240
- "De" "Du" "Di" "Da" "DE" "D" "Do" "DWa" ;; 248
- "je" "ju" "ji" "ja" "jE" "j" "jo" "jWa" ;; 256
- "ge" "gu" "gi" "ga" "gE" "g" "go" "" ;; 264
- "gWe" "" "gWi" "gWa" "gWE" "gW'" "" "" ;; 272
- "Ge" "Gu" "Gi" "Ga" "GE" "G" "Go" "GWa" ;; 280
- "Te" "Tu" "Ti" "Ta" "TE" "T" "To" "TWa" ;; 288
- "Ce" "Cu" "Ci" "Ca" "CE" "C" "Co" "CWa" ;; 296
- "Pe" "Pu" "Pi" "Pa" "PE" "P" "Po" "PWa" ;; 304
- "Se" "Su" "Si" "Sa" "SE" "S" "So" "SWa" ;; 312
- "`Se" "`Su" "`Si" "`Sa" "`SE" "`S" "`So" "" ;; 320
- "fe" "fu" "fi" "fa" "fE" "f" "fo" "fWa" ;; 328
- "pe" "pu" "pi" "pa" "pE" "p" "po" "pWa" ;; 336
- "mYa" "rYa" "fYa" "" "" "" "" "" ;; 344
- " " " : " "::" "," ";" "-:" ":-" "`?" ;; 352
- ":|:" "1" "2" "3" "4" "5" "6" "7" ;; 360
- "8" "9" "10" "20" "30" "40" "50" "60" ;; 368
- "70" "80" "90" "100" "10000" "" "" "" ;; 376
- "`qe" "`qu" "`qi" "`qa" "`qE" "`q" "`qo" "" ;; 384
- "mWe" "bWe" "GWe" "fWe" "pWe" "" "" "" ;; 392
- "`ke" "`ku" "`ki" "`ka" "`kE" "`k" "`ko" "" ;; 400
- "mWi" "bWi" "GWi" "fWi" "pWi" "" "" "" ;; 408
- "Xe" "Xu" "Xi" "Xa" "XE" "X" "Xo" "" ;; 416
- "mWE" "bWE" "GWE" "fWE" "pWE" "" "" "" ;; 424
- "`ge" "`gu" "`gi" "`ga" "`gE" "`g" "`go" "" ;; 432
- "mW'" "bW'" "GW'" "fW'" "pW'" "" "" "" ;; 440
- "\\~X " "\\~e " "\\~E " "\\~a " "\\~A " "wWe" "wWi" "wWa" ;; 448
- "wWE" "wW'" "''" "`!" "." "<<" ">>" "?" ]) ;; 456
-
-(defun ethio-prefer-amharic-p nil
- (or (eq ethio-primary-language 'amharic)
- (and (not (eq ethio-primary-language 'tigrigna))
- (eq ethio-secondary-language 'amharic))))
-
(defun ethio-language-to-flag (lang)
(cond
((eq lang 'english) "eng")
@@ -994,284 +502,142 @@ The markers \"<sera>\" and \"</sera>\" themselves are not deleted."
(t "")))
;;;###autoload
-(defun ethio-fidel-to-sera-region (begin end &optional secondary force)
- "Replace all the FIDEL characters in the region to the SERA format.
+(defun ethio-fidel-to-sera-buffer (&optional secondary force)
+ "Replace all the FIDEL characters in the current buffer to the SERA format.
The variable `ethio-primary-language' specifies the primary
language and `ethio-secondary-language' specifies the secondary.
-If the 3dr parameter SECONDARY is given and non-nil, try to convert
-the region so that it begins in the secondary language; otherwise with
-the primary language.
+If the 1st optional argument SECONDARY is non-nil, try to convert the
+region so that it begins with the secondary language; otherwise with the
+primary language.
-If the 4th parameter FORCE is given and non-nil, convert even if the
+If the 2nd optional argument FORCE is non-nil, convert even if the
buffer is read-only.
See also the descriptions of the variables
`ethio-use-colon-for-colon', `ethio-use-three-dot-question',
`ethio-quote-vowel-always' and `ethio-numeric-reduction'."
- (interactive "r\nP")
- (save-restriction
- (narrow-to-region begin end)
- (ethio-fidel-to-sera-buffer secondary force)))
+ (interactive "P")
+ (ethio-fidel-to-sera-region (point-min) (point-max) secondary force))
;;;###autoload
-(defun ethio-fidel-to-sera-buffer (&optional secondary force)
- "Replace all the FIDEL characters in the current buffer to the SERA format.
+(defun ethio-fidel-to-sera-region (begin end &optional secondary force)
+ "Replace all the FIDEL characters in the region to the SERA format.
+
The variable `ethio-primary-language' specifies the primary
language and `ethio-secondary-language' specifies the secondary.
-If the 1st optional parameter SECONDARY is non-nil, try to convert the
-region so that it begins in the secondary language; otherwise with the
-primary language.
+If the 3rd argument SECONDARY is given and non-nil, convert
+the region so that it begins with the secondary language; otherwise with
+the primary language.
-If the 2nd optional parameter FORCE is non-nil, convert even if the
+If the 4th argument FORCE is given and non-nil, convert even if the
buffer is read-only.
See also the descriptions of the variables
`ethio-use-colon-for-colon', `ethio-use-three-dot-question',
`ethio-quote-vowel-always' and `ethio-numeric-reduction'."
- (interactive "P")
+ (interactive "r\nP")
(if (and buffer-read-only
(not force)
(not (y-or-n-p "Buffer is read-only. Force to convert? ")))
(error ""))
- (let ((buffer-read-only nil)
- (case-fold-search nil)
- (lonec nil) ;; t means previous char was a lone consonant
- (fidel nil) ;; t means previous char was a FIDEL
- (digit nil) ;; t means previous char was an Ethiopic digit
- (flag (if (ethio-prefer-amharic-p) "\\~amh " "\\~tir "))
- mode ch)
-
- ;; user's preference in transcription
- (if ethio-use-colon-for-colon
- (progn
- (aset ethio-fidel-to-sera-map 353 "`:")
- (aset ethio-fidel-to-sera-map 357 ":"))
- (aset ethio-fidel-to-sera-map 353 " : ")
- (aset ethio-fidel-to-sera-map 357 "-:"))
-
- (if ethio-use-three-dot-question
- (progn
- (aset ethio-fidel-to-sera-map 359 "?")
- (aset ethio-fidel-to-sera-map 463 "`?"))
- (aset ethio-fidel-to-sera-map 359 "`?")
- (aset ethio-fidel-to-sera-map 463 "?"))
-
- (mapcar
- '(lambda (x)
- (aset (aref ethio-fidel-to-sera-map x)
- 2
- (if ethio-W-sixth-always ?' ?u)))
- '(77 93 141 181 197 277 440 441 442 443 444 457))
-
- (if (ethio-prefer-amharic-p)
- (aset ethio-fidel-to-sera-map 160 "a")
- (aset ethio-fidel-to-sera-map 160 "e"))
- ;; end of user's preference
-
- ;; first, decompose geminated characters
- (decompose-region (point-min) (point-max))
-
- ;; main conversion routine
- (goto-char (point-min))
- (while (not (eobp))
- (setq ch (following-char))
-
- (cond ; ethiopic, english, neutral
-
- ;; ethiopic character. must go to ethiopic mode, if not in it.
- ((eq (char-charset ch) 'ethiopic)
- (setq ch (ethio-char-to-ethiocode ch))
- (delete-char 1)
- (if (not (eq mode 'ethiopic))
- (progn
- (insert flag)
- (setq mode 'ethiopic)))
-
- (cond ; fidel, punc, digit
-
- ;; fidels
- ((or (<= ch 346) ; he - fYa
- (and (>= ch 384) (<= ch 444)) ; `qe - pw
- (and (>= ch 453) (<= ch 457))) ; wWe - wW
- (if (and (memq ch '(160 161 162 163 164 166 167)) ; (e - ea)
- (or lonec
- (and ethio-quote-vowel-always
- fidel)))
- (insert "'"))
- (insert (aref ethio-fidel-to-sera-map ch))
- (setq lonec (ethio-lone-consonant-p ch)
- fidel t
- digit nil))
-
- ;; punctuations or icons
- ((or (and (>= ch 353) (<= ch 360)) ; : - :|:
- (>= ch 458) ; '' - ?
- (and (>= ch 448) (<= ch 452))) ; \~X \~e \~E \~a \~A
- (insert (aref ethio-fidel-to-sera-map ch))
- (setq lonec nil
- fidel nil
- digit nil))
-
- ;; now CH must be an ethiopic digit
-
- ;; reduction = 0 or not preceded by Ethiopic number(s)
- ((or (= ethio-numeric-reduction 0)
- (not digit))
- (insert "`" (aref ethio-fidel-to-sera-map ch))
- (setq lonec nil
- fidel nil
- digit t))
-
- ;; reduction = 2 and following 10s, 100s, 10000s
- ((and (= ethio-numeric-reduction 2)
- (memq ch '(370 379 380)))
- (insert (substring (aref ethio-fidel-to-sera-map ch) 1))
- (setq lonec nil
- fidel nil
- digit t))
-
- ;; ordinary following digits
- (t
- (insert (aref ethio-fidel-to-sera-map ch))
- (setq lonec nil
- fidel nil
- digit t))))
-
- ;; english character. must go to english mode, if not in it.
- ((or (and (>= ch ?a) (<= ch ?z))
- (and (>= ch ?A) (<= ch ?Z)))
- (if (not (eq mode 'english))
- (insert "\\~eng "))
- (forward-char 1)
- (setq mode 'english
- lonec nil
- fidel nil
- digit nil))
+ (save-restriction
+ (narrow-to-region begin end)
- ;; ch can appear both in ethiopic section and in english section.
- (t
+ (let ((buffer-read-only nil)
+ (mode (if secondary
+ ethio-secondary-language
+ ethio-primary-language))
+ (flag (if (ethio-prefer-amharic-p) "\\~amh " "\\~tir "))
+ p ch)
- ;; we must decide the mode, if not decided yet
- (if (null mode)
+ (goto-char (point-min))
+ (ethio-adjust-robin)
+ (unless (eq mode 'english)
+ (setq mode 'ethiopic))
+ (if (and (eq mode 'english) (looking-at "\\ce"))
+ (setq mode 'ethiopic))
+ (if (and (eq mode 'ethiopic) (looking-at "\\Ce"))
+ (setq mode 'english))
+ (insert (if (eq mode 'english) "\\~eng " flag))
+
+ (while (not (eobp))
+
+ (if (eq mode 'english)
(progn
- (setq mode
- (if secondary
- ethio-secondary-language
- ethio-primary-language))
- (if (eq mode 'english)
- (insert "\\~eng ")
+ (if (re-search-forward "\\(\\ce\\|\\\\\\)" nil 0)
+ (forward-char -1))
+ (cond
+ ((eq (following-char) ?\\)
+ (insert "\\")
+ (forward-char 1))
+ ((looking-at "\\ce")
(insert flag)
- (setq mode 'ethiopic)))) ; tigrigna & amharic --> ethiopic
-
- (cond ; \ , eng-mode , punc , w3 , other
+ (setq mode 'ethiopic))))
- ;; backslash is always quoted
- ((= ch ?\\ )
- (insert "\\")
- (forward-char 1))
+ ;; If we reach here, mode is ethiopic.
+ (setq p (point))
+ (if (re-search-forward "[a-z,.;:'`?\\<&]" nil 0)
+ (forward-char -1))
+ (save-restriction
+ (narrow-to-region p (point))
+ (robin-invert-region (point-min) (point-max) "ethiopic-sera")
- ;; nothing to do if in english mode
- ((eq mode 'english)
- (forward-char 1))
-
- ;; now we must be in ethiopic mode and seeing a non-"\"
-
- ;; ascii punctuations in ethiopic mode
- ((looking-at "[,.;:'`?]+")
- (insert "\\")
- (goto-char (1+ (match-end 0)))) ; because we inserted one byte (\)
-
- ;; skip from "<" to ">" (or from "&" to ";") if called from w3
- ((and (or (= ch ?<) (= ch ?&))
- (or (and (boundp 'ethio-sera-being-called-by-w3)
- ethio-sera-being-called-by-w3)
- (and (boundp 'sera-being-called-by-w3)
- sera-being-called-by-w3)))
- (search-forward (if (= ch ?<) ">" ";")
- nil 0))
-
- ;; neutral character. no need to quote. just skip it.
- (t
- (forward-char 1)))
-
- (setq lonec nil
- fidel nil
- digit nil)))
- ;; end of main conversion routine
- )))
-
-(defun ethio-lone-consonant-p (ethiocode)
- "If ETHIOCODE is an Ethiopic lone consonant, return t."
- (or (and (< ethiocode 344) (= (% ethiocode 8) 5))
-
- ;; `q `k X `g mW bW GW fW pW wW
- (memq ethiocode '(389 405 421 437 440 441 442 443 444 457))))
-
-;;;###autoload
-(defun ethio-fidel-to-sera-mail-or-marker (&optional arg)
- "Execute `ethio-fidel-to-sera-mail' or `ethio-fidel-to-sera-marker' depending on the current major mode.
-If in rmail-mode or in mail-mode, execute the former; otherwise latter."
-
- (interactive "P")
- (if (or (eq major-mode 'rmail-mode)
- (eq major-mode 'mail-mode))
- (ethio-fidel-to-sera-mail)
- (ethio-fidel-to-sera-marker arg)))
-
-;;;###autoload
-(defun ethio-fidel-to-sera-mail nil
- "Convert FIDEL to SERA to read/write mail and news.
-
-If the body contains at least one Ethiopic character,
- 1) insert the string \"<sera>\" at the beginning of the body,
- 2) insert \"</sera>\" at the end of the body, and
- 3) convert the body into SERA.
-
-The very same procedure applies to the subject field, too."
-
- (interactive)
- (let ((buffer-read-only nil)
- border)
- (save-excursion
-
- ;; follow RFC822 rules instead of looking for a fixed separator
- (rfc822-goto-eoh)
- (forward-line 1)
- (setq border (point))
-
- ;; process body first not to change the border
- ;; note that the point is already at the border
- (if (re-search-forward "\\ce" nil t)
- (progn
- (ethio-fidel-to-sera-region border (point-max))
- (goto-char border)
- (insert "<sera>")
- (goto-char (point-max))
- (insert "</sera>")))
+ ;; ethio-quote-vowel-alwyas
+ (goto-char (point-min))
+ (while (re-search-forward "'[eauio]" nil t)
+ (save-excursion
+ (forward-char -2)
+ (setq ch (preceding-char))
+ (if (or (and (>= ch ?a) (<= ch ?z))
+ (and (>= ch ?A) (<= ch ?Z)))
+ (if (and (not ethio-quote-vowel-always)
+ (memq ch '(?e ?a ?u ?i ?o ?E ?A ?I)))
+ (delete-char 1))
+ (delete-char 1))))
+
+ ;; ethio-W-sixth-always
+ (unless ethio-W-sixth-always
+ (goto-char (point-min))
+ (while (search-forward "W'" nil t)
+ (delete-char -1)
+ (insert "u")))
- ;; process subject
- (goto-char (point-min))
- (if (re-search-forward "^Subject: " border t)
- (let ((beg (point))
- (end (line-end-position)))
- (if (re-search-forward "\\ce" end t)
- (progn
- (ethio-fidel-to-sera-region beg end)
- (goto-char beg)
- (insert "<sera>")
- (end-of-line)
- (insert "</sera>")))))
-
- ;; adjust the rmail marker
- (if (eq major-mode 'rmail-mode)
- (set-marker
- (aref rmail-message-vector (1+ rmail-current-message))
- (point-max))))))
+ ;; ethio-numeric-reduction
+ (when (> ethio-numeric-reduction 0)
+ (goto-char (point-min))
+ (while (re-search-forward "\\([0-9]\\)`\\([0-9]\\)" nil t)
+ (replace-match "\\1\\2")
+ (forward-char -1)))
+ (when (= ethio-numeric-reduction 2)
+ (goto-char (point-min))
+ (while (re-search-forward "\\([0-9]\\)1\\(0+\\)" nil t)
+ (replace-match "\\1\\2")))
+
+ (goto-char (point-max)))
+
+ (cond
+ ((looking-at "[a-z]")
+ (insert"\\~eng ")
+ (setq mode 'english))
+ ((looking-at "[,.;:'`\\]+")
+ (insert "\\")
+ (goto-char (1+ (match-end 0))))
+ ((= (following-char) ??)
+ (if ethio-use-three-dot-question
+ (insert "\\"))
+ (forward-char 1))
+ ((looking-at "[<&]")
+ (if (or (and (boundp 'ethio-sera-being-called-by-w3)
+ ethio-sera-being-called-by-w3)
+ (and (boundp 'sera-being-called-by-w3)
+ sera-being-called-by-w3))
+ (search-forward (if (= (following-char) ?<) ">" "&") nil 0)
+ (forward-char 1)))))))))
;;;###autoload
(defun ethio-fidel-to-sera-marker (&optional force)
@@ -1285,10 +651,10 @@ The markers \"<sera>\" and \"</sera>\" themselves are not deleted."
(error ""))
(save-excursion
(goto-char (point-min))
- (while (re-search-forward "<sera>" nil t)
+ (while (search-forward "<sera>" nil t)
(ethio-fidel-to-sera-region
(point)
- (if (re-search-forward "</sera>" nil t)
+ (if (search-forward "</sera>" nil t)
(match-beginning 0)
(point-max))
nil
@@ -1302,225 +668,31 @@ The markers \"<sera>\" and \"</sera>\" themselves are not deleted."
(defun ethio-modify-vowel nil
"Modify the vowel of the FIDEL that is under the cursor."
(interactive)
- (let ((ch (following-char))
- (composite nil) ; geminated or not
- newch base vowel modulo)
-
- (cond
- ;; in case of gemination
- ((eq (char-charset ch) 'composition)
- (setq ch (string-to-char (char-to-string ch))
- composite t))
- ;; neither gemination nor fidel
- ((not (eq (char-charset ch) 'ethiopic))
- (error "Not a valid character")))
-
- ;; set frequently referred character features
- (setq ch (ethio-char-to-ethiocode ch)
- base (* (/ ch 8) 8)
- modulo (% ch 8))
-
- (if (or (and (>= ch 344) (<= ch 380)) ;; mYa - `10000
- (and (>= ch 448) (<= ch 452)) ;; \~X - \~A
- (>= ch 458)) ;; private punctuations
- (error "Not a valid character"))
-
- (setq
- newch
- (cond
-
- ;; first standalone vowels
- ((= base 160)
- (if (ethio-prefer-amharic-p)
- (message "Modify vowel to: [auiAEIoW\"] ")
- (message "Modify vowel to: [euiAEIoW\"] "))
- (setq vowel (read-char))
- (cond
- ((= vowel ?e) 160)
- ((= vowel ?u) 161)
- ((= vowel ?i) 162)
- ((= vowel ?A) 163)
- ((= vowel ?E) 164)
- ((= vowel ?I) 165)
- ((= vowel ?o) 166)
- ((= vowel ?W) 167)
- ((= vowel ?a) (if (ethio-prefer-amharic-p) 160 163))
- ((= vowel ?\") (setq composite t) ch)
- (t nil)))
-
- ;; second standalone vowels
- ((= base 208)
- (message "Modify vowel to: [euiaEIo\"] ")
- (setq vowel (read-char))
- (cond
- ((= vowel ?e) 208)
- ((= vowel ?u) 209)
- ((= vowel ?i) 210)
- ((= vowel ?a) 211)
- ((= vowel ?E) 212)
- ((= vowel ?I) 213)
- ((= vowel ?o) 214)
- ((= vowel ?\") (setq composite t) ch)
- (t nil)))
-
- ;; 12-form consonants, *W* form
- ((memq base '(72 88 136 176 192 272)) ; qW QW hW kW KW gW
- (message "Modify vowel to: [euiaE'\"] ")
- (setq vowel (read-char))
- (cond
- ((= vowel ?e) base)
- ((= vowel ?u) (+ base 5))
- ((= vowel ?i) (+ base 2))
- ((= vowel ?a) (+ base 3))
- ((= vowel ?E) (+ base 4))
- ((= vowel ?') (+ base 5))
- ((= vowel ?\") (setq composite t) ch)
- (t nil)))
-
- ;; extended 12-form consonants, mWa bWa GWa fWa pWa
- ((= ch 31) ; mWa
- (message "Modify vowel to: [euiaE'\"] ")
- (setq vowel (read-char))
- (cond
- ((= vowel ?e) 392)
- ((= vowel ?u) 440)
- ((= vowel ?i) 408)
- ((= vowel ?a) ch)
- ((= vowel ?E) 424)
- ((= vowel ?') 440)
- ((= vowel ?\") (setq composite t) ch)
- (t nil)))
- ((= ch 103) ; bWa
- (message "Modify vowel to: [euiaE'\"] ")
- (setq vowel (read-char))
- (cond
- ((= vowel ?e) 393)
- ((= vowel ?u) 441)
- ((= vowel ?i) 409)
- ((= vowel ?a) ch)
- ((= vowel ?E) 425)
- ((= vowel ?') 441)
- ((= vowel ?\") (setq composite t) ch)
- (t nil)))
- ((= ch 287) ; GWa
- (message "Modify vowel to: [euiaE'\"] ")
- (setq vowel (read-char))
- (cond
- ((= vowel ?e) 394)
- ((= vowel ?u) 442)
- ((= vowel ?i) 410)
- ((= vowel ?a) ch)
- ((= vowel ?E) 426)
- ((= vowel ?') 442)
- ((= vowel ?\") (setq composite t) ch)
- (t nil)))
- ((= ch 335) ; fWa
- (message "Modify vowel to: [euiaE'\"] ")
- (setq vowel (read-char))
- (cond
- ((= vowel ?e) 395)
- ((= vowel ?u) 443)
- ((= vowel ?i) 411)
- ((= vowel ?a) ch)
- ((= vowel ?E) 427)
- ((= vowel ?') 443)
- ((= vowel ?\") (setq composite t) ch)
- (t nil)))
- ((= ch 343) ; pWa
- (message "Modify vowel to: [euiaE'\"] ")
- (setq vowel (read-char))
- (cond
- ((= vowel ?e) 396)
- ((= vowel ?u) 444)
- ((= vowel ?i) 412)
- ((= vowel ?a) ch)
- ((= vowel ?E) 428)
- ((= vowel ?') 444)
- ((= vowel ?\") (setq composite t) ch)
- (t nil)))
-
- ;; extended 12-form consonatns, mW* bW* GW* fW* pW*
- ((memq base '(392 408 424 440)) ; *We *Wi *WE *W
- (message "Modify vowel to: [eiEau'\"] ")
- (setq vowel (read-char))
- (cond
- ((= vowel ?e) (+ 392 modulo))
- ((= vowel ?i) (+ 408 modulo))
- ((= vowel ?E) (+ 424 modulo))
- ((= vowel ?a) (cond
- ((= modulo 0) 31) ; mWa
- ((= modulo 1) 103) ; bWa
- ((= modulo 2) 287) ; GWa
- ((= modulo 3) 335) ; fWa
- ((= modulo 4) 343) ; pWa
- (t nil))) ; never reach here
- ((= vowel ?') (+ 440 modulo))
- ((= vowel ?u) (+ 440 modulo))
- ((= vowel ?\") (setq composite t) ch)
- (t nil)))
-
- ((and (>= ch 453) (<= ch 457)) ; wWe wWi wWa wWE wW
- (message "Modify vowel to: [eiaE'u\"] ")
- (setq vowel (read-char))
- (cond
- ((= vowel ?e) 453)
- ((= vowel ?i) 454)
- ((= vowel ?a) 455)
- ((= vowel ?E) 456)
- ((= vowel ?') 457)
- ((= vowel ?u) 457)
- ((= vowel ?\") (setq composite t) ch)
- (t nil)))
-
- ;; 7-form consonants, or
- ;; first 7 of 8-form consonants
- ((<= modulo 6)
- (message "Modify vowel to: [euiaE'o\"] ")
- (setq vowel (read-char))
- (cond
- ((= vowel ?e) base)
- ((= vowel ?u) (+ base 1))
- ((= vowel ?i) (+ base 2))
- ((= vowel ?a) (+ base 3))
- ((= vowel ?E) (+ base 4))
- ((= vowel ?') (+ base 5))
- ((= vowel ?o) (+ base 6))
- ((= vowel ?\") (setq composite t) ch)
- (t nil)))
-
- ;; otherwise
- (t
- nil)))
-
- (cond
-
- ;; could not get new character
- ((null newch)
- (error "Invalid vowel"))
-
- ;; vowel changed on a composite Fidel
- (composite
+ (ethio-adjust-robin)
+ (let ((consonant (ethio-get-consonant (following-char)))
+ vowel)
+ (if (null consonant)
+ (error "") ; not an Ethiopic char
+ (setq vowel (read-char "Modify vowel to: "))
(delete-char 1)
- (insert
- (compose-string
- (concat (char-to-string (ethio-ethiocode-to-char newch)) "$(3%s(B"))))
-
- ;; simple vowel modification
- (t
- (delete-char 1)
- (insert (ethio-ethiocode-to-char newch))))))
-
-(defun ethio-ethiocode-to-char (ethiocode)
- (make-char
- 'ethiopic
- (+ (/ ethiocode 94) 33)
- (+ (mod ethiocode 94) 33)))
-
-(defun ethio-char-to-ethiocode (ch)
- (and (eq (char-charset ch) 'ethiopic)
- (let ((char-components (split-char ch)))
- (+ (* (- (nth 1 char-components) 33) 94)
- (- (nth 2 char-components) 33)))))
+ (if (and (string= consonant "'") (= vowel ?W))
+ (insert ?ኧ)
+ (save-restriction
+ (narrow-to-region (point) (point))
+ (insert consonant vowel)
+ (robin-convert-region (point-min) (point-max) "ethiopic-sera"))))))
+
+(defun ethio-get-consonant (ch)
+ "Return the consonant part of CH's SERA spelling in ethiopic-sera."
+ (let ((sera (get-char-code-property ch 'ethiopic-sera)))
+ (cond
+ ((null sera) nil)
+ ((= ch ?ኧ) "'") ; Only this has two vowel letters.
+ (t (with-temp-buffer
+ (insert sera)
+ (if (memq (preceding-char) '(?e ?u ?i ?a ?o ?E ?I ?A ?'))
+ (delete-char -1))
+ (buffer-substring (point-min) (point-max)))))))
;;
;; space replacement
@@ -1531,14 +703,14 @@ The markers \"<sera>\" and \"</sera>\" themselves are not deleted."
"Replace ASCII spaces with Ethiopic word separators in the region.
In the specified region, replace word separators surrounded by two
-Ethiopic characters, depending on the first parameter CH, which should
+Ethiopic characters, depending on the first argument CH, which should
be 1, 2, or 3.
If CH = 1, word separator will be replaced with an ASCII space.
If CH = 2, with two ASCII spaces.
If CH = 3, with the Ethiopic colon-like word separator.
-The second and third parameters BEGIN and END specify the region."
+The 2nd and 3rd arguments BEGIN and END specify the region."
(interactive "*cReplace spaces to: 1 (sg col), 2 (dbl col), 3 (Ethiopic)\nr")
(if (not (memq ch '(?1 ?2 ?3)))
@@ -1551,61 +723,62 @@ The second and third parameters BEGIN and END specify the region."
((= ch ?1)
;; an Ethiopic word separator --> an ASCII space
(goto-char (point-min))
- (while (search-forward "$(3$h(B" nil t)
- (replace-match " " nil t))
+ (while (search-forward "á¡" nil t)
+ (replace-match " "))
;; two ASCII spaces between Ethiopic characters --> an ASCII space
(goto-char (point-min))
(while (re-search-forward "\\(\\ce\\) \\(\\ce\\)" nil t)
(replace-match "\\1 \\2")
- (goto-char (match-beginning 2))))
+ (forward-char -1)))
((= ch ?2)
;; An Ethiopic word separator --> two ASCII spaces
(goto-char (point-min))
- (while (search-forward "$(3$h(B" nil t)
+ (while (search-forward "á¡" nil t)
(replace-match " "))
;; An ASCII space between Ethiopic characters --> two ASCII spaces
(goto-char (point-min))
(while (re-search-forward "\\(\\ce\\) \\(\\ce\\)" nil t)
(replace-match "\\1 \\2")
- (goto-char (match-beginning 2))))
+ (forward-char -1)))
(t
;; One or two ASCII spaces between Ethiopic characters
;; --> An Ethiopic word separator
(goto-char (point-min))
(while (re-search-forward "\\(\\ce\\) ?\\(\\ce\\)" nil t)
- (replace-match "\\1$(3$h(B\\2")
- (goto-char (match-beginning 2)))
+ (replace-match "\\1á¡\\2")
+ (forward-char -1))
;; Three or more ASCII spaces between Ethiopic characters
;; --> An Ethiopic word separator + (N - 2) ASCII spaces
(goto-char (point-min))
- (while (re-search-forward "\\(\\ce\\) \\( *\\ce\\)" nil t)
- (replace-match "\\1$(3$h(B\\2")
- (goto-char (match-beginning 2))))))))
+ (while (re-search-forward "\\(\\ce\\) \\( +\\ce\\)" nil t)
+ (replace-match "\\1á¡\\2")
+ (forward-char -1)))))))
;;
;; special icons
;;
+;; This function is deprecated.
;;;###autoload
(defun ethio-input-special-character (arg)
- "Allow the user to input special characters."
- (interactive "*cInput number: 1.$(3%j(B 2.$(3%k(B 3.$(3%l(B 4.$(3%m(B 5.$(3%i(B")
+ "This function is deprecated."
+ (interactive "*cInput number: 1.ö ‡ 2.ö ‡‚ 3.ö ‡ƒ 4.ö ‡„ 5.ö ‡€")
(cond
((= arg ?1)
- (insert "$(3%j(B"))
+ (insert "ö ‡"))
((= arg ?2)
- (insert "$(3%k(B"))
+ (insert "ö ‡‚"))
((= arg ?3)
- (insert "$(3%l(B"))
+ (insert "ö ‡ƒ"))
((= arg ?4)
- (insert "$(3%m(B"))
+ (insert "ö ‡„"))
((= arg ?5)
- (insert "$(3%i(B"))
+ (insert "ö ‡€"))
(t
(error ""))))
@@ -1613,120 +786,49 @@ The second and third parameters BEGIN and END specify the region."
;; TeX support
;;
-(defconst ethio-fidel-to-tex-map
- [ "heG" "huG" "hiG" "haG" "hEG" "hG" "hoG" "" ;; 0 - 7
- "leG" "luG" "liG" "laG" "lEG" "lG" "loG" "lWaG" ;; 8
- "HeG" "HuG" "HiG" "HaG" "HEG" "HG" "HoG" "HWaG" ;; 16
- "meG" "muG" "miG" "maG" "mEG" "mG" "moG" "mWaG" ;; 24
- "sseG" "ssuG" "ssiG" "ssaG" "ssEG" "ssG" "ssoG" "ssWaG" ;; 32
- "reG" "ruG" "riG" "raG" "rEG" "rG" "roG" "rWaG" ;; 40
- "seG" "suG" "siG" "saG" "sEG" "sG" "soG" "sWaG" ;; 48
- "xeG" "xuG" "xiG" "xaG" "xEG" "xG" "xoG" "xWaG" ;; 56
- "qeG" "quG" "qiG" "qaG" "qEG" "qG" "qoG" "" ;; 64
- "qWeG" "" "qWiG" "qWaG" "qWEG" "qWG" "" "" ;; 72
- "QeG" "QuG" "QiG" "QaG" "QEG" "QG" "QoG" "" ;; 80
- "QWeG" "" "QWiG" "QWaG" "QWEG" "QWG" "" "" ;; 88
- "beG" "buG" "biG" "baG" "bEG" "bG" "boG" "bWaG" ;; 96
- "veG" "vuG" "viG" "vaG" "vEG" "vG" "voG" "vWaG" ;; 104
- "teG" "tuG" "tiG" "taG" "tEG" "tG" "toG" "tWaG" ;; 112
- "ceG" "cuG" "ciG" "caG" "cEG" "cG" "coG" "cWaG" ;; 120
- "hheG" "hhuG" "hhiG" "hhaG" "hhEG" "hhG" "hhoG" "" ;; 128
- "hWeG" "" "hWiG" "hWaG" "hWEG" "hWG" "" "" ;; 136
- "neG" "nuG" "niG" "naG" "nEG" "nG" "noG" "nWaG" ;; 144
- "NeG" "NuG" "NiG" "NaG" "NEG" "NG" "NoG" "NWaG" ;; 152
- "eG" "uG" "iG" "AG" "EG" "IG" "oG" "eaG" ;; 160
- "keG" "kuG" "kiG" "kaG" "kEG" "kG" "koG" "" ;; 168
- "kWeG" "" "kWiG" "kWaG" "kWEG" "kWG" "" "" ;; 176
- "KeG" "KuG" "KiG" "KaG" "KEG" "KG" "KoG" "" ;; 184
- "KWeG" "" "KWiG" "KWaG" "KWEG" "KWG" "" "" ;; 192
- "weG" "wuG" "wiG" "waG" "wEG" "wG" "woG" "" ;; 200
- "eeG" "uuG" "iiG" "aaG" "EEG" "IIG" "ooG" "" ;; 208
- "zeG" "zuG" "ziG" "zaG" "zEG" "zG" "zoG" "zWaG" ;; 216
- "ZeG" "ZuG" "ZiG" "ZaG" "ZEG" "ZG" "ZoG" "ZWaG" ;; 224
- "yeG" "yuG" "yiG" "yaG" "yEG" "yG" "yoG" "yWaG" ;; 232
- "deG" "duG" "diG" "daG" "dEG" "dG" "doG" "dWaG" ;; 240
- "DeG" "DuG" "DiG" "DaG" "DEG" "DG" "DoG" "DWaG" ;; 248
- "jeG" "juG" "jiG" "jaG" "jEG" "jG" "joG" "jWaG" ;; 256
- "geG" "guG" "giG" "gaG" "gEG" "gG" "goG" "" ;; 264
- "gWeG" "" "gWiG" "gWaG" "gWEG" "gWG" "" "" ;; 272
- "GeG" "GuG" "GiG" "GaG" "GEG" "GG" "GoG" "GWaG" ;; 280
- "TeG" "TuG" "TiG" "TaG" "TEG" "TG" "ToG" "TWaG" ;; 288
- "CeG" "CuG" "CiG" "CaG" "CEG" "CG" "CoG" "CWaG" ;; 296
- "PeG" "PuG" "PiG" "PaG" "PEG" "PG" "PoG" "PWaG" ;; 304
- "SeG" "SuG" "SiG" "SaG" "SEG" "SG" "SoG" "SWaG" ;; 312
- "SSeG" "SSuG" "SSiG" "SSaG" "SSEG" "SSG" "SSoG" "" ;; 320
- "feG" "fuG" "fiG" "faG" "fEG" "fG" "foG" "fWaG" ;; 328
- "peG" "puG" "piG" "paG" "pEG" "pG" "poG" "pWaG" ;; 336
- "mYaG" "rYaG" "fYaG" "" "" "" "" "" ;; 344
- "" "spaceG" "periodG" "commaG" ;; 352
- "semicolonG" "colonG" "precolonG" "oldqmarkG" ;; 356
- "pbreakG" "andG" "huletG" "sostG" "aratG" "amstG" "sadstG" "sabatG" ;; 360
- "smntG" "zeteNG" "asrG" "heyaG" "selasaG" "arbaG" "hemsaG" "slsaG" ;; 368
- "sebaG" "semanyaG" "zeTanaG" "metoG" "asrxiG" "" "" "" ;; 376
- "qqeG" "qquG" "qqiG" "qqaG" "qqEG" "qqG" "qqoG" "" ;; 384
- "mWeG" "bWeG" "GWeG" "fWeG" "pWeG" "" "" "" ;; 392
- "kkeG" "kkuG" "kkiG" "kkaG" "kkEG" "kkG" "kkoG" "" ;; 400
- "mWiG" "bWiG" "GWiG" "fWiG" "pWiG" "" "" "" ;; 408
- "XeG" "XuG" "GXiG" "XaG" "XEG" "XG" "XoG" "" ;; 416
- "mWEG" "bWEG" "GWEG" "fWEG" "pWEG" "" "" "" ;; 424
- "ggeG" "gguG" "ggiG" "ggaG" "ggEG" "ggG" "ggoG" "" ;; 432
- "mWG" "bWG" "GWG" "fWG" "pWG" "" "" "" ;; 440
- "ornamentG" "flandG" "iflandG" "africaG" ;; 448
- "iafricaG" "wWeG" "wWiG" "wWaG" ;; 452
- "wWEG" "wWG" "" "slaqG" "dotG" "lquoteG" "rquoteG" "qmarkG" ]) ;; 456
-
-;;
-;; To make tex-to-fidel mapping.
-;; The following code makes
-;; (get 'ethio-tex-command-he 'ethio-fidel-char) ==> ?$(3!!(B
-;; etc.
-;;
-
-(let ((i 0) str)
- (while (< i (length ethio-fidel-to-tex-map))
- (setq str (aref ethio-fidel-to-tex-map i))
- (if (not (string= str ""))
- (put
- (intern (concat "ethio-tex-command-" (aref ethio-fidel-to-tex-map i)))
- 'ethio-fidel-char
- (ethio-ethiocode-to-char i)))
- (setq i (1+ i))))
-
;;;###autoload
(defun ethio-fidel-to-tex-buffer nil
- "Convert each fidel characters in the current buffer into a fidel-tex command.
-Each command is always surrounded by braces."
+ "Convert each fidel characters in the current buffer into a fidel-tex command."
(interactive)
- (let ((buffer-read-only nil))
+ (let ((buffer-read-only nil)
+ comp ch)
- ;; Isolated gemination marks need special treatement
+ ;; Special treatment for geminated characters.
+ ;; Geminated characters la", etc. change into \geminateG{\laG}, etc.
(goto-char (point-min))
- (while (search-forward "$(3%s(B" nil t)
- (replace-match "\\geminateG{}" t t))
-
- ;; First, decompose geminations
- ;; Here we assume that each composed character consists of
- ;; one Ethiopic character and the Ethiopic gemination mark.
- (decompose-region (point-min) (point-max))
+ (while (re-search-forward "áŸ\\|ö ‡Š" nil t)
+ (setq comp (find-composition (match-beginning 0)))
+ (if (null comp)
+ (replace-match "\\\\geminateG{}" t)
+ (decompose-region (car comp) (cadr comp))
+ (delete-char -1)
+ (forward-char -1)
+ (insert "\\geminateG{")
+ (forward-char 1)
+ (insert "}")))
- ;; Special treatment for geminated characters
- ;; The geminated character (la'') will be "\geminateG{\la}".
+ ;; Special Ethiopic punctuations.
(goto-char (point-min))
- (while (search-forward "$(3%s(B" nil t)
- (delete-backward-char 1)
- (backward-char 1)
- (insert "\\geminateG")
- (forward-char 1))
+ (while (re-search-forward "\\ce[»\\.\\?]\\|«\\ce" nil t)
+ (cond
+ ((= (setq ch (preceding-char)) ?\»)
+ (delete-char -1)
+ (insert "\\rquoteG"))
+ ((= ch ?.)
+ (delete-char -1)
+ (insert "\\dotG"))
+ ((= ch ??)
+ (delete-char -1)
+ (insert "\\qmarkG"))
+ (t
+ (forward-char -1)
+ (delete-char -1)
+ (insert "\\lquoteG")
+ (forward-char 1))))
;; Ethiopic characters to TeX macros
- (goto-char (point-min))
- (while (re-search-forward "\\ce" nil t)
- (insert
- "{\\"
- (aref ethio-fidel-to-tex-map
- (prog1 (ethio-char-to-ethiocode (preceding-char))
- (backward-delete-char 1)))
- "}"))
+ (robin-invert-region (point-min) (point-max) "ethiopic-tex")
+
(goto-char (point-min))
(set-buffer-modified-p nil)))
@@ -1737,43 +839,18 @@ Each command is always surrounded by braces."
(let ((buffer-read-only nil)
(p) (ch))
- ;; Special treatment for gemination
- ;; "\geminateG{\la}" or "\geminateG{{\la}}" will be "\la$(3%s(B"
- ;; "\geminateG{}" remains unchanged.
- (goto-char (point-min))
- (while (re-search-forward "\\\\geminateG{\\(\\\\[a-zA-Z]+\\)}" nil t)
- (replace-match "\\1$(3%s(B"))
-
;; TeX macros to Ethiopic characters
- (goto-char (point-min))
- (while (search-forward "\\" nil t)
- (setq p (point))
- (skip-chars-forward "a-zA-Z")
- (setq ch
- (get (intern (concat "ethio-tex-command-"
- (buffer-substring p (point))))
- 'ethio-fidel-char))
- (if ch
- (progn
- (delete-region (1- p) (point)) ; don't forget the preceding "\"
- (if (and (= (preceding-char) ?{)
- (= (following-char) ?}))
- (progn
- (backward-delete-char 1)
- (delete-char 1)))
- (insert ch))))
+ (robin-convert-region (point-min) (point-max) "ethiopic-tex")
;; compose geminated characters
(goto-char (point-min))
- (while (re-search-forward "\\ce$(3%s(B" nil 0)
- (compose-region
- (save-excursion (backward-char 2) (point))
- (point)))
+ (while (re-search-forward "\\\\geminateG{\\(\\ce?\\)}" nil t)
+ (replace-match "\\1áŸ"))
- ;; Now it's time to convert isolated gemination marks.
+ ;; remove redundant braces, if any
(goto-char (point-min))
- (while (search-forward "\\geminateG{}" nil t)
- (replace-match "$(3%s(B"))
+ (while (re-search-forward "{\\(\\ce\\)}" nil t)
+ (replace-match "\\1"))
(goto-char (point-min))
(set-buffer-modified-p nil)))
@@ -1793,47 +870,24 @@ If `ethio-java-save-lowercase' is non-nil, use [0-9a-f].
Otherwise, [0-9A-F]."
(let ((ucode))
- ;; first, decompose geminations
- (decompose-region (point-min) (point-max))
-
(goto-char (point-min))
- (while (re-search-forward "\\ce" nil t)
- (setq ucode (+ ?\x1200 (ethio-char-to-ethiocode (preceding-char))))
- (if (> ucode ?\x13bc)
- (setq ucode (+ ucode 59952)))
+ (while (re-search-forward "[ሀ-á¼]" nil t)
+ (setq ucode (preceding-char))
(delete-backward-char 1)
- (if ethio-java-save-lowercase
- (insert (format "\\u%4x" ucode))
- (insert (upcase (format "\\u%4x" ucode)))))))
+ (insert
+ (format (if ethio-java-save-lowercase "\\u%4x" "\\u%4X")
+ ucode)))))
;;;###autoload
(defun ethio-java-to-fidel-buffer nil
"Convert the Java escape sequences into corresponding Ethiopic characters."
- (let ((ucode))
- (goto-char (point-min))
- (while (re-search-forward "\\\\u\\([0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]\\)" nil t)
- (setq ucode
- (read
- (concat
- "?\\x"
- (buffer-substring (match-beginning 1) (match-end 1)))))
- (cond
- ((and (>= ucode ?\x1200) (<= ucode ?\x13bc))
- (replace-match "")
- (insert (ethio-ethiocode-to-char (- ucode ?\x1200))))
- ((and (>= ucode ?\xfdf1) (<= ucode ?\xfdff))
- (replace-match "")
- (insert (ethio-ethiocode-to-char (- ucode 64560))))
- (t
- nil)))
-
- ;; gemination
+ (let ((case-fold-search t)
+ (ucode))
(goto-char (point-min))
- (while (re-search-forward "\\ce$(3%s(B" nil 0)
- (compose-region
- (save-excursion (backward-char 2) (point))
- (point)))
- ))
+ (while (re-search-forward "\\\\u\\([0-9a-f][0-9a-f][0-9a-f][0-9a-f]\\)" nil t)
+ (setq ucode (read (concat "#x" (match-string 1))))
+ (when (and (>= ucode #x1200) (<= ucode #x137f))
+ (replace-match (char-to-string ucode))))))
;;
;; file I/O hooks
@@ -1841,7 +895,7 @@ Otherwise, [0-9A-F]."
;;;###autoload
(defun ethio-find-file nil
- "Transcribe file content into Ethiopic depending on filename suffix."
+ "Transliterate file content into Ethiopic dependig on filename suffix."
(cond
((string-match "\\.sera$" (buffer-file-name))
@@ -1854,10 +908,10 @@ Otherwise, [0-9A-F]."
(save-excursion
(ethio-sera-to-fidel-marker 'force)
(goto-char (point-min))
- (while (re-search-forward "&[lr]aquote;" nil t)
+ (while (re-search-forward "&[lr]aquo;" nil t)
(if (= (char-after (1+ (match-beginning 0))) ?l)
- (replace-match "$(3%v(B")
- (replace-match "$(3%w(B")))
+ (replace-match "«")
+ (replace-match "»")))
(set-buffer-modified-p nil))))
((string-match "\\.tex$" (buffer-file-name))
@@ -1875,7 +929,7 @@ Otherwise, [0-9A-F]."
;;;###autoload
(defun ethio-write-file nil
- "Transcribe Ethiopic characters in ASCII depending on the file extension."
+ "Transliterate Ethiopic characters in ASCII depending on the file extension."
(cond
((string-match "\\.sera$" (buffer-file-name))
@@ -1887,17 +941,14 @@ Otherwise, [0-9A-F]."
((string-match "\\.html$" (buffer-file-name))
(save-excursion
- (let ((ethio-sera-being-called-by-w3 t)
- (lq (aref ethio-fidel-to-sera-map 461))
- (rq (aref ethio-fidel-to-sera-map 462)))
- (aset ethio-fidel-to-sera-map 461 "&laquote;")
- (aset ethio-fidel-to-sera-map 462 "&raquote;")
+ (let ((ethio-sera-being-called-by-w3 t))
(ethio-fidel-to-sera-marker 'force)
(goto-char (point-min))
+ (while (re-search-forward "[«»]" nil t)
+ (replace-match (if (= (preceding-char) ?«) "&laquo;" "&raquo;")))
+ (goto-char (point-min))
(if (search-forward "<sera>" nil t)
(ethio-record-user-preference))
- (aset ethio-fidel-to-sera-map 461 lq)
- (aset ethio-fidel-to-sera-map 462 rq)
(set-buffer-modified-p nil))))
((string-match "\\.tex$" (buffer-file-name))
@@ -1914,11 +965,8 @@ Otherwise, [0-9A-F]."
nil)))
(defun ethio-record-user-preference nil
- (if (looking-at "\\\\~\\(tir?\\|amh?\\) ")
- (goto-char (match-end 0))
- (insert (if (ethio-prefer-amharic-p) "\\~amh " "\\~tir ")))
(insert (if ethio-use-colon-for-colon "\\~-: " "\\~`: ")
- (if ethio-use-three-dot-question "\\~`| " "\\~`? ")))
+ (if ethio-use-three-dot-question "\\~`| " "\\~? ")))
;;
;; Ethiopic word separator vs. ASCII space
@@ -1931,10 +979,7 @@ Otherwise, [0-9A-F]."
"Toggle ASCII space and Ethiopic separator for keyboard input."
(interactive)
(setq ethio-prefer-ascii-space
- (not ethio-prefer-ascii-space))
- (if (equal current-input-method "ethiopic")
- (setq current-input-method-title (quail-title)))
- (force-mode-line-update))
+ (not ethio-prefer-ascii-space)))
(defun ethio-insert-space (arg)
"Insert ASCII spaces or Ethiopic word separators depending on context.
@@ -1957,68 +1002,1080 @@ many Ethiopic word separators."
((save-excursion
(skip-chars-backward " ")
(memq (preceding-char)
- '(?$(3$h(B ?$(3$i(B ?$(3$j(B ?$(3$k(B ?$(3$l(B ?$(3$m(B ?$(3$n(B ?$(3$o(B ?$(3%t(B ?$(3%u(B ?$(3%v(B ?$(3%w(B ?$(3%x(B)))
+ '(?á¡ ?ᢠ?ᣠ?ᤠ?ᥠ?ᦠ?᧠?ᨠ?ö ‡‹ ?ö ‡Œ ?ö ‡ ?ö ‡Ž ?ö ‡)))
(insert-char 32 arg))
(t
- (insert-char ?$(3$h(B arg))))
+ (insert-char ?á¡ arg))))
+;;;###autoload
(defun ethio-insert-ethio-space (arg)
"Insert the Ethiopic word delimiter (the colon-like character).
With ARG, insert that many delimiters."
(interactive "*p")
- (insert-char ?$(3$h(B arg))
-
-;;
-;; Ethiopic punctuation vs. ASCII punctuation
-;;
-
-(defvar ethio-prefer-ascii-punctuation nil)
-(make-variable-buffer-local 'ethio-prefer-ascii-punctuation)
-
-(defun ethio-toggle-punctuation nil
- "Toggle Ethiopic punctuations and ASCII punctuations for keyboard input."
- (interactive)
- (setq ethio-prefer-ascii-punctuation
- (not ethio-prefer-ascii-punctuation))
- (let* ((keys '("." ".." "..." "," ",," ";" ";;" ":" "::" ":::" "*" "**"))
- (puncs
- (if ethio-prefer-ascii-punctuation
- '(?. [".."] ["..."] ?, [",,"] ?\; [";;"] ?: ["::"] [":::"] ?* ["**"])
- '(?$(3$i(B ?$(3%u(B ?. ?$(3$j(B ?, ?$(3$k(B ?\; ?$(3$h(B ?$(3$i(B ?: ?* ?$(3$o(B))))
- (while keys
- (quail-defrule (car keys) (car puncs) "ethiopic")
- (setq keys (cdr keys)
- puncs (cdr puncs)))
- (if (equal current-input-method "ethiopic")
- (setq current-input-method-title (quail-title)))
- (force-mode-line-update)))
+ (insert-char ?á¡ arg))
;;
;; Gemination
;;
+;;;###autoload
+(defun ethio-composition-function (pos &optional string)
+ (setq pos (1- pos))
+ (let ((pattern "\\ce\\(áŸ\\|ö ‡Š\\)"))
+ (if string
+ (if (and (>= pos 0)
+ (eq (string-match pattern string pos) pos))
+ (prog1 (match-end 0)
+ (compose-string string pos (match-end 0))))
+ (if (>= pos (point-min))
+ (progn
+ (goto-char pos)
+ (if (looking-at pattern)
+ (prog1 (match-end 0)
+ (compose-region pos (match-end 0)))))))))
+
+;; This function is not used any more.
(defun ethio-gemination nil
"Compose the character before the point with the Ethiopic gemination mark.
If the character is already composed, decompose it and remove the gemination
mark."
(interactive "*")
- (cond
- ((eq (char-charset (preceding-char)) 'ethiopic)
- (insert "$(3%s(B")
- (compose-region
- (save-excursion (backward-char 2) (point))
- (point))
- (forward-char 1))
- ((eq (char-charset (preceding-char)) 'leading-code-composition)
- (decompose-region
- (save-excursion (backward-char 1) (point))
- (point))
- (delete-backward-char 1))
- (t
- (error ""))))
+ (let ((ch (preceding-char)))
+ (cond
+ ((and (= ch ?ö ‡Š) (find-composition (1- (point))))
+ (decompose-region (- (point) 2) (point)))
+ ((and (>= ch #x1200) (<= ch #x137f))
+ (insert "ö ‡Š")
+ (compose-region (- (point) 2) (point)))
+ (t
+ (error "")))))
+
+;;;
+;;; Robin packages
+;;;
+
+(robin-define-package "ethiopic-sera"
+ "SERA transliteration system for Ethiopic."
+
+ ("he" ?ሀ)
+ ("hu" ?áˆ)
+ ("hi" ?ሂ)
+ ("ha" ?ሃ)
+ ("hE" ?ሄ) ("hee" "ሄ")
+ ("h" ?ህ)
+ ("ho" ?ሆ)
+
+ ("le" ?ለ) ("Le" "ለ")
+ ("lu" ?ሉ) ("Lu" "ሉ")
+ ("li" ?ሊ) ("Li" "ሊ")
+ ("la" ?ላ) ("La" "ላ")
+ ("lE" ?ሌ) ("LE" "ሌ") ("lee" "ሌ") ("Lee" "ሌ")
+ ("l" ?áˆ) ("L" "áˆ")
+ ("lo" ?ሎ) ("Lo" "ሎ")
+ ("lWa" ?áˆ) ("LWa" "áˆ") ("lW" "áˆ") ("LW" "áˆ")
+
+ ("He" ?áˆ)
+ ("Hu" ?ሑ)
+ ("Hi" ?ሒ)
+ ("Ha" ?ሓ)
+ ("HE" ?ሔ) ("Hee" "ሔ")
+ ("H" ?ሕ)
+ ("Ho" ?ሖ)
+ ("HWa" ?ሗ) ("HW" "ሗ")
+
+ ("me" ?መ) ("Me" "መ")
+ ("mu" ?ሙ) ("Mu" "ሙ")
+ ("mi" ?ሚ) ("Mi" "ሚ")
+ ("ma" ?ማ) ("Ma" "ማ")
+ ("mE" ?ሜ) ("ME" "ሜ") ("mee" "ሜ") ("Mee" "ሜ")
+ ("m" ?áˆ) ("M" "áˆ")
+ ("mo" ?ሞ) ("Mo" "ሞ")
+ ("mWa" ?ሟ) ("MWa" "ሟ") ("mW" "ሟ") ("MW" "ሟ")
+
+ ("`se" ?ሠ) ("sse" "ሠ") ("s2e" "ሠ")
+ ("`su" ?ሡ) ("ssu" "ሡ") ("s2u" "ሡ")
+ ("`si" ?ሢ) ("ssi" "ሢ") ("s2i" "ሢ")
+ ("`sa" ?ሣ) ("ssa" "ሣ") ("s2a" "ሣ")
+ ("`sE" ?ሤ) ("ssE" "ሤ") ("s2E" "ሤ")
+ ("`see" "ሤ") ("ssee" "ሤ") ("s2ee" "ሤ")
+ ("`s" ?ሥ) ("ss" "ሥ") ("s2" "ሥ")
+ ("`so" ?ሦ) ("sso" "ሦ") ("s2o" "ሦ")
+ ("`sWa" ?ሧ) ("ssWa" "ሧ") ("s2Wa" "ሧ")
+ ("`sW" "ሧ") ("ssW" "ሧ") ("s2W" "ሧ")
+
+ ("re" ?ረ) ("Re" "ረ")
+ ("ru" ?ሩ) ("Ru" "ሩ")
+ ("ri" ?ሪ) ("Ri" "ሪ")
+ ("ra" ?ራ) ("Ra" "ራ")
+ ("rE" ?ሬ) ("RE" "ሬ") ("ree" "ሬ") ("Ree" "ሬ")
+ ("r" ?ር) ("R" "ር")
+ ("ro" ?ሮ) ("Ro" "ሮ")
+ ("rWa" ?ሯ) ("RWa" "ሯ") ("rW" "ሯ") ("RW" "ሯ")
+
+ ("se" ?ሰ)
+ ("su" ?ሱ)
+ ("si" ?ሲ)
+ ("sa" ?ሳ)
+ ("sE" ?ሴ) ("see" "ሴ")
+ ("s" ?ስ)
+ ("so" ?ሶ)
+ ("sWa" ?ሷ) ("sW" "ሷ")
+
+ ("xe" ?ሸ)
+ ("xu" ?ሹ)
+ ("xi" ?ሺ)
+ ("xa" ?ሻ)
+ ("xE" ?ሼ) ("xee" "ሼ")
+ ("x" ?ሽ)
+ ("xo" ?ሾ)
+ ("xWa" ?ሿ) ("xW" "ሿ")
+
+ ("qe" ?ቀ)
+ ("qu" ?á‰)
+ ("qi" ?ቂ)
+ ("qa" ?ቃ)
+ ("qE" ?ቄ) ("qee" "ቄ")
+ ("q" ?ቅ)
+ ("qo" ?ቆ)
+ ("qWe" ?ቈ)
+ ("qWi" ?ቊ)
+ ("qWa" ?ቋ) ("qW" "ቋ")
+ ("qWE" ?ቌ) ("qWee" "ቌ")
+ ("qW'" ?á‰) ("qWu" "á‰")
+
+ ("Qe" ?á‰)
+ ("Qu" ?ቑ)
+ ("Qi" ?ቒ)
+ ("Qa" ?ቓ)
+ ("QE" ?ቔ) ("Qee" "ቔ")
+ ("Q" ?ቕ)
+ ("Qo" ?ቖ)
+ ("QWe" ?ቘ)
+ ("QWi" ?ቚ)
+ ("QWa" ?ቛ) ("QW" "ቛ")
+ ("QWE" ?ቜ) ("QWee" "ቜ")
+ ("QW'" ?á‰) ("QWu" "á‰")
+
+ ("be" ?በ) ("Be" "በ")
+ ("bu" ?ቡ) ("Bu" "ቡ")
+ ("bi" ?ቢ) ("Bi" "ቢ")
+ ("ba" ?ባ) ("Ba" "ባ")
+ ("bE" ?ቤ) ("BE" "ቤ") ("bee" "ቤ") ("Bee" "ቤ")
+ ("b" ?ብ) ("B" "ብ")
+ ("bo" ?ቦ) ("Bo" "ቦ")
+ ("bWa" ?ቧ) ("BWa" "ቧ") ("bW" "ቧ") ("BW" "ቧ")
+
+ ("ve" ?ቨ) ("Ve" "ቨ")
+ ("vu" ?ቩ) ("Vu" "ቩ")
+ ("vi" ?ቪ) ("Vi" "ቪ")
+ ("va" ?ቫ) ("Va" "ቫ")
+ ("vE" ?ቬ) ("VE" "ቬ") ("vee" "ቬ") ("Vee" "ቬ")
+ ("v" ?ቭ) ("V" "ቭ")
+ ("vo" ?ቮ) ("Vo" "ቮ")
+ ("vWa" ?ቯ) ("VWa" "ቯ") ("vW" "ቯ") ("VW" "ቯ")
+
+ ("te" ?ተ)
+ ("tu" ?ቱ)
+ ("ti" ?ቲ)
+ ("ta" ?ታ)
+ ("tE" ?ቴ) ("tee" "ቴ")
+ ("t" ?ት)
+ ("to" ?ቶ)
+ ("tWa" ?ቷ) ("tW" "ቷ")
+
+ ("ce" ?ቸ)
+ ("cu" ?ቹ)
+ ("ci" ?ቺ)
+ ("ca" ?ቻ)
+ ("cE" ?ቼ) ("cee" "ቼ")
+ ("c" ?ች)
+ ("co" ?ቾ)
+ ("cWa" ?ቿ) ("cW" "ቿ")
+
+ ("`he" ?ኀ) ("hhe" "ኀ") ("h2e" "ኀ")
+ ("`hu" ?áŠ) ("hhu" "áŠ") ("h2u" "áŠ")
+ ("`hi" ?ኂ) ("hhi" "ኂ") ("h2i" "ኂ")
+ ("`ha" ?ኃ) ("hha" "ኃ") ("h2a" "ኃ")
+ ("`hE" ?ኄ) ("hhE" "ኄ") ("h2E" "ኄ")
+ ("`hee" "ኄ") ("hhee" "ኄ") ("h2ee" "ኄ")
+ ("`h" ?ኅ) ("hh" "ኅ") ("h2" "ኅ")
+ ("`ho" ?ኆ) ("hho" "ኆ") ("h2o" "ኆ")
+ ("`hWe" ?ኈ) ("hhWe" "ኈ") ("h2We" "ኈ") ("hWe" "ኈ")
+ ("`hWi" ?ኊ) ("hhWi" "ኊ") ("h2Wi" "ኊ") ("hWi" "ኊ")
+ ("`hWa" ?ኋ) ("hhWa" "ኋ") ("h2Wa" "ኋ") ("hWa" "ኋ")
+ ("`hW" "ኋ") ("hhW" "ኋ") ("h2W" "ኋ")
+ ("`hWE" ?ኌ) ("hhWE" "ኌ") ("h2WE" "ኌ") ("hWE" "ኌ")
+ ("`hWee" "ኌ") ("hhWee" "ኌ") ("h2Wee" "ኌ") ("hWee" "ኌ")
+ ("`hW'" ?áŠ) ("hhW'" "áŠ") ("h2W'" "áŠ") ("hW'" "áŠ")
+ ("`hWu" "áŠ") ("hhWu" "áŠ") ("h2Wu" "áŠ") ("hWu" "áŠ")
+
+ ("ne" ?áŠ)
+ ("nu" ?ኑ)
+ ("ni" ?ኒ)
+ ("na" ?ና)
+ ("nE" ?ኔ) ("nee" "ኔ")
+ ("n" ?ን)
+ ("no" ?ኖ)
+ ("nWa" ?ኗ) ("nW" "ኗ")
+
+ ("Ne" ?ኘ)
+ ("Nu" ?ኙ)
+ ("Ni" ?ኚ)
+ ("Na" ?ኛ)
+ ("NE" ?ኜ) ("Nee" "ኜ")
+ ("N" ?áŠ)
+ ("No" ?ኞ)
+ ("NWa" ?ኟ) ("NW" "ኟ")
+
+ ("'A" ?አ) ("A" "አ")
+ ("'u" ?ኡ) ("u" "ኡ") ("'U" "ኡ") ("U" "ኡ")
+ ("'i" ?ኢ) ("i" "ኢ")
+ ("'a" ?ኣ) ("a" "ኣ")
+ ("'E" ?ኤ) ("E" "ኤ")
+ ("'I" ?እ) ("I" "እ") ("'e" "እ") ("e" "እ")
+ ("'o" ?ኦ) ("o" "ኦ") ("'O" "ኦ") ("O" "ኦ")
+ ("'ea" ?ኧ) ("ea" "ኧ")
+
+ ("ke" ?ከ)
+ ("ku" ?ኩ)
+ ("ki" ?ኪ)
+ ("ka" ?ካ)
+ ("kE" ?ኬ) ("kee" "ኬ")
+ ("k" ?ክ)
+ ("ko" ?ኮ)
+ ("kWe" ?ኰ)
+ ("kWi" ?ኲ)
+ ("kWa" ?ኳ) ("kW" "ኳ")
+ ("kWE" ?ኴ) ("kWee" "ኴ")
+ ("kW'" ?ኵ) ("kWu" "ኵ")
+
+ ("Ke" ?ኸ)
+ ("Ku" ?ኹ)
+ ("Ki" ?ኺ)
+ ("Ka" ?ኻ)
+ ("KE" ?ኼ) ("Kee" "ኼ")
+ ("K" ?ኽ)
+ ("Ko" ?ኾ)
+ ("KWe" ?á‹€)
+ ("KWi" ?á‹‚)
+ ("KWa" ?ዃ) ("KW" "ዃ")
+ ("KWE" ?á‹„) ("KWee" "á‹„")
+ ("KW'" ?á‹…) ("KWu" "á‹…")
+
+ ("we" ?ወ)
+ ("wu" ?ዉ)
+ ("wi" ?á‹Š)
+ ("wa" ?á‹‹)
+ ("wE" ?ዌ) ("wee" "ዌ")
+ ("w" ?á‹)
+ ("wo" ?á‹Ž)
+
+ ("`e" ?á‹) ("ae" "á‹") ("aaa" "á‹") ("e2" "á‹")
+ ("`u" ?á‹‘) ("uu" "á‹‘") ("u2" "á‹‘") ("`U" "á‹‘") ("UU" "á‹‘") ("U2" "á‹‘")
+ ("`i" ?á‹’) ("ii" "á‹’") ("i2" "á‹’")
+ ("`a" ?á‹“) ("aa" "á‹“") ("a2" "á‹“") ("`A" "á‹“") ("AA" "á‹“") ("A2" "á‹“")
+ ("`E" ?á‹”) ("EE" "á‹”") ("E2" "á‹”")
+ ("`I" ?á‹•) ("II" "á‹•") ("I2" "á‹•") ("ee" "á‹•")
+ ("`o" ?á‹–) ("oo" "á‹–") ("o2" "á‹–") ("`O" "á‹–") ("OO" "á‹–") ("O2" "á‹–")
+
+ ("ze" ?ዘ)
+ ("zu" ?á‹™)
+ ("zi" ?á‹š)
+ ("za" ?á‹›)
+ ("zE" ?ዜ) ("zee" "ዜ")
+ ("z" ?á‹)
+ ("zo" ?á‹ž)
+ ("zWa" ?á‹Ÿ) ("zW" "á‹Ÿ")
+
+ ("Ze" ?á‹ )
+ ("Zu" ?á‹¡)
+ ("Zi" ?á‹¢)
+ ("Za" ?á‹£)
+ ("ZE" ?ዤ) ("Zee" "ዤ")
+ ("Z" ?á‹¥)
+ ("Zo" ?ዦ)
+ ("ZWa" ?ዧ) ("ZW" "ዧ")
+
+ ("ye" ?የ) ("Ye" "የ")
+ ("yu" ?á‹©) ("Yu" "á‹©")
+ ("yi" ?ዪ) ("Yi" "ዪ")
+ ("ya" ?á‹«) ("Ya" "á‹«")
+ ("yE" ?ዬ) ("YE" "ዬ") ("yee" "ዬ") ("Yee" "ዬ")
+ ("y" ?á‹­) ("Y" "á‹­")
+ ("yo" ?á‹®) ("Yo" "á‹®")
+
+ ("de" ?á‹°)
+ ("du" ?ዱ)
+ ("di" ?ዲ)
+ ("da" ?ዳ)
+ ("dE" ?á‹´) ("dee" "á‹´")
+ ("d" ?ድ)
+ ("do" ?ዶ)
+ ("dWa" ?á‹·) ("dW" "á‹·")
+
+ ("De" ?ዸ)
+ ("Du" ?ዹ)
+ ("Di" ?ዺ)
+ ("Da" ?á‹»)
+ ("DE" ?ዼ) ("Dee" "ዼ")
+ ("D" ?ዽ)
+ ("Do" ?ዾ)
+ ("DWa" ?á‹¿) ("DW" "á‹¿")
+
+ ("je" ?ጀ) ("Je" "ጀ")
+ ("ju" ?áŒ) ("Ju" "áŒ")
+ ("ji" ?ጂ) ("Ji" "ጂ")
+ ("ja" ?ጃ) ("Ja" "ጃ")
+ ("jE" ?ጄ) ("JE" "ጄ") ("jee" "ጄ") ("Jee" "ጄ")
+ ("j" ?ጅ) ("J" "ጅ")
+ ("jo" ?ጆ) ("Jo" "ጆ")
+ ("jWa" ?ጇ) ("jW" "ጇ") ("JWa" "ጇ") ("JW" "ጇ")
+
+ ("ge" ?ገ)
+ ("gu" ?ጉ)
+ ("gi" ?ጊ)
+ ("ga" ?ጋ)
+ ("gE" ?ጌ) ("gee" "ጌ")
+ ("g" ?áŒ)
+ ("go" ?ጎ)
+ ("gWe" ?áŒ)
+ ("gWi" ?ጒ)
+ ("gWa" ?ጓ) ("gW" "ጓ")
+ ("gWE" ?ጔ) ("gWee" "ጔ")
+ ("gW'" ?ጕ) ("gWu" "ጕ")
+
+ ("Ge" ?ጘ)
+ ("Gu" ?ጙ)
+ ("Gi" ?ጚ)
+ ("Ga" ?ጛ)
+ ("GE" ?ጜ) ("Gee" "ጜ")
+ ("G" ?áŒ)
+ ("Go" ?ጞ)
+
+ ("Te" ?ጠ)
+ ("Tu" ?ጡ)
+ ("Ti" ?ጢ)
+ ("Ta" ?ጣ)
+ ("TE" ?ጤ) ("Tee" "ጤ")
+ ("T" ?ጥ)
+ ("To" ?ጦ)
+ ("TWa" ?ጧ) ("TW" "ጧ")
+
+ ("Ce" ?ጨ)
+ ("Cu" ?ጩ)
+ ("Ci" ?ጪ)
+ ("Ca" ?ጫ)
+ ("CE" ?ጬ) ("Cee" "ጬ")
+ ("C" ?ጭ)
+ ("Co" ?ጮ)
+ ("CWa" ?ጯ) ("CW" "ጯ")
+
+ ("Pe" ?ጰ)
+ ("Pu" ?ጱ)
+ ("Pi" ?ጲ)
+ ("Pa" ?ጳ)
+ ("PE" ?ጴ) ("Pee" "ጴ")
+ ("P" ?ጵ)
+ ("Po" ?ጶ)
+ ("PWa" ?ጷ) ("PW" "ጷ")
+
+ ("Se" ?ጸ)
+ ("Su" ?ጹ)
+ ("Si" ?ጺ)
+ ("Sa" ?ጻ)
+ ("SE" ?ጼ) ("See" "ጼ")
+ ("S" ?ጽ)
+ ("So" ?ጾ)
+ ("SWa" ?ጿ) ("`SWa" "ጿ") ("SSWa" "ጿ") ("S2Wa" "ጿ")
+ ("SW" "ጿ") ("`SW" "ጿ") ("SSW" "ጿ") ("S2W" "ጿ")
+
+ ("`Se" ?á€) ("SSe" "á€") ("S2e" "á€")
+ ("`Su" ?á) ("SSu" "á") ("S2u" "á")
+ ("`Si" ?á‚) ("SSi" "á‚") ("S2i" "á‚")
+ ("`Sa" ?áƒ) ("SSa" "áƒ") ("S2a" "áƒ")
+ ("`SE" ?á„) ("SSE" "á„") ("S2E" "á„")
+ ("`See" "á„") ("SSee" "á„") ("S2ee" "á„")
+ ("`S" ?á…) ("SS" "á…") ("S2" "á…")
+ ("`So" ?á†) ("SSo" "á†") ("S2o" "á†")
+
+ ("fe" ?áˆ) ("Fe" "áˆ")
+ ("fu" ?á‰) ("Fu" "á‰")
+ ("fi" ?áŠ) ("Fi" "áŠ")
+ ("fa" ?á‹) ("Fa" "á‹")
+ ("fE" ?áŒ) ("FE" "áŒ") ("fee" "áŒ") ("Fee" "áŒ")
+ ("f" ?á) ("F" "á")
+ ("fo" ?áŽ) ("Fo" "áŽ")
+ ("fWa" ?á) ("FWa" "á") ("fW" "á") ("FW" "á")
+
+ ("pe" ?á)
+ ("pu" ?á‘)
+ ("pi" ?á’)
+ ("pa" ?á“)
+ ("pE" ?á”) ("pee" "á”")
+ ("p" ?á•)
+ ("po" ?á–)
+ ("pWa" ?á—) ("pW" "á—")
+
+ ("rYa" ?á˜) ("RYa" "á˜") ("rY" "á˜") ("RY" "á˜")
+ ("mYa" ?á™) ("MYa" "á™") ("mY" "á™") ("MY" "á™")
+ ("fYa" ?áš) ("FYa" "áš") ("fY" "áš") ("FY" "áš")
+
+ (" : " ?á¡) (":" "á¡") ("`:" "á¡")
+ ("::" ?á¢) ("." "á¢")
+ ("," ?á£)
+ (";" ?á¤)
+ ("-:" ?á¥)
+ (":-" ?á¦)
+ ("`?" ?á§) ("??" "á§")
+ (":|:" ?á¨) ("**" "á¨")
+
+ ;; Explicit syllable delimiter
+ ("'" "")
+
+ ;; Quick ASCII input
+ ("''" "'")
+ (":::" ":")
+ (".." ".")
+ (",," ",")
+ (";;" ";")
+
+ ("`1" ?á©)
+ ("`2" ?áª)
+ ("`3" ?á«)
+ ("`4" ?á¬)
+ ("`5" ?á­)
+ ("`6" ?á®)
+ ("`7" ?á¯)
+ ("`8" ?á°)
+ ("`9" ?á±)
+ ("`10" ?á²)
+ ("`20" ?á³)
+ ("`30" ?á´)
+ ("`40" ?áµ)
+ ("`50" ?á¶)
+ ("`60" ?á·)
+ ("`70" ?á¸)
+ ("`80" ?á¹)
+ ("`90" ?áº)
+ ("`100" ?á»)
+ ("`10000" ?á¼)
+
+ ("`200" "áªá»")
+ ("`300" "á«á»")
+ ("`400" "á¬á»")
+ ("`500" "á­á»")
+ ("`600" "á®á»")
+ ("`700" "á¯á»")
+ ("`800" "á°á»")
+ ("`900" "á±á»")
+ ("`1000" "á²á»")
+ ("`2000" "á³á»")
+ ("`3000" "á´á»")
+ ("`4000" "áµá»")
+ ("`5000" "á¶á»")
+ ("`6000" "á·á»")
+ ("`7000" "á¸á»")
+ ("`8000" "á¹á»")
+ ("`9000" "áºá»")
+ ("`20000" "áªá¼")
+ ("`30000" "á«á¼")
+ ("`40000" "á¬á¼")
+ ("`50000" "á­á¼")
+ ("`60000" "á®á¼")
+ ("`70000" "á¯á¼")
+ ("`80000" "á°á¼")
+ ("`90000" "á±á¼")
+ ("`100000" "á²á¼")
+ ("`200000" "á³á¼")
+ ("`300000" "á´á¼")
+ ("`400000" "áµá¼")
+ ("`500000" "á¶á¼")
+ ("`600000" "á·á¼")
+ ("`700000" "á¸á¼")
+ ("`800000" "á¹á¼")
+ ("`900000" "áºá¼")
+ ("`1000000" "á»á¼")
+ )
+
+(register-input-method
+ "ethiopic-sera" "Ethiopic"
+ 'robin-use-package "et" "An input method for Ethiopic.")
+
+(robin-define-package "ethiopic-tex"
+ "TeX transliteration system for Ethiopic."
+
+ ("\\heG" ?ሀ) ; U+1200 ..
+ ("\\huG" ?áˆ)
+ ("\\hiG" ?ሂ)
+ ("\\haG" ?ሃ)
+ ("\\hEG" ?ሄ)
+ ("\\hG" ?ህ)
+ ("\\hoG" ?ሆ)
+ ;; reserved
+ ("\\leG" ?ለ)
+ ("\\luG" ?ሉ)
+ ("\\liG" ?ሊ)
+ ("\\laG" ?ላ)
+ ("\\lEG" ?ሌ)
+ ("\\lG" ?áˆ)
+ ("\\loG" ?ሎ)
+ ("\\lWaG" ?áˆ)
+
+ ("\\HeG" ?áˆ) ; U+1210 ..
+ ("\\HuG" ?ሑ)
+ ("\\HiG" ?ሒ)
+ ("\\HaG" ?ሓ)
+ ("\\HEG" ?ሔ)
+ ("\\HG" ?ሕ)
+ ("\\HoG" ?ሖ)
+ ("\\HWaG" ?ሗ)
+ ("\\meG" ?መ)
+ ("\\muG" ?ሙ)
+ ("\\miG" ?ሚ)
+ ("\\maG" ?ማ)
+ ("\\mEG" ?ሜ)
+ ("\\mG" ?áˆ)
+ ("\\moG" ?ሞ)
+ ("\\mWaG" ?ሟ)
+
+ ("\\sseG" ?ሠ) ; U+1220 ..
+ ("\\ssuG" ?ሡ)
+ ("\\ssiG" ?ሢ)
+ ("\\ssaG" ?ሣ)
+ ("\\ssEG" ?ሤ)
+ ("\\ssG" ?ሥ)
+ ("\\ssoG" ?ሦ)
+ ("\\ssWaG" ?ሧ)
+ ("\\reG" ?ረ)
+ ("\\ruG" ?ሩ)
+ ("\\riG" ?ሪ)
+ ("\\raG" ?ራ)
+ ("\\rEG" ?ሬ)
+ ("\\rG" ?ር)
+ ("\\roG" ?ሮ)
+ ("\\rWaG" ?ሯ)
+
+ ("\\seG" ?ሰ) ; U+1230 ..
+ ("\\suG" ?ሱ)
+ ("\\siG" ?ሲ)
+ ("\\saG" ?ሳ)
+ ("\\sEG" ?ሴ)
+ ("\\sG" ?ስ)
+ ("\\soG" ?ሶ)
+ ("\\sWaG" ?ሷ)
+ ("\\xeG" ?ሸ)
+ ("\\xuG" ?ሹ)
+ ("\\xiG" ?ሺ)
+ ("\\xaG" ?ሻ)
+ ("\\xEG" ?ሼ)
+ ("\\xG" ?ሽ)
+ ("\\xoG" ?ሾ)
+ ("\\xWaG" ?ሿ)
+
+ ("\\qeG" ?ቀ) ; U+1240 ..
+ ("\\quG" ?á‰)
+ ("\\qiG" ?ቂ)
+ ("\\qaG" ?ቃ)
+ ("\\qEG" ?ቄ)
+ ("\\qG" ?ቅ)
+ ("\\qoG" ?ቆ)
+ ;; reserved
+ ("\\qWeG" ?ቈ)
+ ;; reserved
+ ("\\qWiG" ?ቊ)
+ ("\\qWaG" ?ቋ)
+ ("\\qWEG" ?ቌ)
+ ("\\qWG" ?á‰)
+ ;; reserved
+ ;; reserved
+
+ ("\\QeG" ?á‰) ; U+1250 ..
+ ("\\QuG" ?ቑ)
+ ("\\QiG" ?ቒ)
+ ("\\QaG" ?ቓ)
+ ("\\QEG" ?ቔ)
+ ("\\QG" ?ቕ)
+ ("\\QoG" ?ቖ)
+ ;; reserved
+ ("\\QWeG" ?ቘ)
+ ;; reserved
+ ("\\QWiG" ?ቚ)
+ ("\\QWaG" ?ቛ)
+ ("\\QWEG" ?ቜ)
+ ("\\QWG" ?á‰)
+ ;; reserved
+ ;; reserved
+
+ ("\\beG" ?በ) ; U+1260 ..
+ ("\\buG" ?ቡ)
+ ("\\biG" ?ቢ)
+ ("\\baG" ?ባ)
+ ("\\bEG" ?ቤ)
+ ("\\bG" ?ብ)
+ ("\\boG" ?ቦ)
+ ("\\bWaG" ?ቧ)
+ ("\\veG" ?ቨ)
+ ("\\vuG" ?ቩ)
+ ("\\viG" ?ቪ)
+ ("\\vaG" ?ቫ)
+ ("\\vEG" ?ቬ)
+ ("\\vG" ?ቭ)
+ ("\\voG" ?ቮ)
+ ("\\vWaG" ?ቯ)
+
+ ("\\teG" ?ተ) ; U+1270 ..
+ ("\\tuG" ?ቱ)
+ ("\\tiG" ?ቲ)
+ ("\\taG" ?ታ)
+ ("\\tEG" ?ቴ)
+ ("\\tG" ?ት)
+ ("\\toG" ?ቶ)
+ ("\\tWaG" ?ቷ)
+ ("\\ceG" ?ቸ)
+ ("\\cuG" ?ቹ)
+ ("\\ciG" ?ቺ)
+ ("\\caG" ?ቻ)
+ ("\\cEG" ?ቼ)
+ ("\\cG" ?ች)
+ ("\\coG" ?ቾ)
+ ("\\cWaG" ?ቿ)
+
+ ("\\hheG" ?ኀ) ; U+1280 ..
+ ("\\hhuG" ?áŠ)
+ ("\\hhiG" ?ኂ)
+ ("\\hhaG" ?ኃ)
+ ("\\hhEG" ?ኄ)
+ ("\\hhG" ?ኅ)
+ ("\\hhoG" ?ኆ)
+ ;; reserved
+ ("\\hWeG" ?ኈ)
+ ;; reserved
+ ("\\hWiG" ?ኊ)
+ ("\\hWaG" ?ኋ)
+ ("\\hWEG" ?ኌ)
+ ("\\hWG" ?áŠ)
+ ;; reserved
+ ;; reserved
+
+ ("\\neG" ?áŠ) ; U+1290 ..
+ ("\\nuG" ?ኑ)
+ ("\\niG" ?ኒ)
+ ("\\naG" ?ና)
+ ("\\nEG" ?ኔ)
+ ("\\nG" ?ን)
+ ("\\noG" ?ኖ)
+ ("\\nWaG" ?ኗ)
+ ("\\NeG" ?ኘ)
+ ("\\NuG" ?ኙ)
+ ("\\NiG" ?ኚ)
+ ("\\NaG" ?ኛ)
+ ("\\NEG" ?ኜ)
+ ("\\NG" ?áŠ)
+ ("\\NoG" ?ኞ)
+ ("\\NWaG" ?ኟ)
+
+ ("\\eG" ?አ) ; U+12A0 ..
+ ("\\uG" ?ኡ)
+ ("\\iG" ?ኢ)
+ ("\\AG" ?ኣ)
+ ("\\EG" ?ኤ)
+ ("\\IG" ?እ)
+ ("\\oG" ?ኦ)
+ ("\\eaG" ?ኧ)
+ ("\\keG" ?ከ)
+ ("\\kuG" ?ኩ)
+ ("\\kiG" ?ኪ)
+ ("\\kaG" ?ካ)
+ ("\\kEG" ?ኬ)
+ ("\\kG" ?ክ)
+ ("\\koG" ?ኮ)
+ ;; reserved
+
+ ("\\kWeG" ?ኰ) ; U+12B0 ..
+ ;; reserved
+ ("\\kWiG" ?ኲ)
+ ("\\kWaG" ?ኳ)
+ ("\\kWEG" ?ኴ)
+ ("\\kWG" ?ኵ)
+ ;; reserved
+ ;; reserved
+ ("\\KeG" ?ኸ)
+ ("\\KuG" ?ኹ)
+ ("\\KiG" ?ኺ)
+ ("\\KaG" ?ኻ)
+ ("\\KEG" ?ኼ)
+ ("\\KG" ?ኽ)
+ ("\\KoG" ?ኾ)
+ ;; reserved
+
+ ("\\KWeG" ?á‹€) ; U+12C0 ..
+ ;; reserved
+ ("\\KWiG" ?á‹‚)
+ ("\\KWaG" ?ዃ)
+ ("\\KWEG" ?á‹„)
+ ("\\KWG" ?á‹…)
+ ;; reserved
+ ;; reserved
+ ("\\weG" ?ወ)
+ ("\\wuG" ?ዉ)
+ ("\\wiG" ?á‹Š)
+ ("\\waG" ?á‹‹)
+ ("\\wEG" ?ዌ)
+ ("\\wG" ?á‹)
+ ("\\woG" ?á‹Ž)
+ ;; reserved
+
+ ("\\eeG" ?á‹) ; U+12D0 ..
+ ("\\uuG" ?á‹‘)
+ ("\\iiG" ?á‹’)
+ ("\\aaG" ?á‹“)
+ ("\\EEG" ?á‹”)
+ ("\\IIG" ?á‹•)
+ ("\\ooG" ?á‹–)
+ ;; reserved
+ ("\\zeG" ?ዘ)
+ ("\\zuG" ?á‹™)
+ ("\\ziG" ?á‹š)
+ ("\\zaG" ?á‹›)
+ ("\\zEG" ?ዜ)
+ ("\\zG" ?á‹)
+ ("\\zoG" ?á‹ž)
+ ("\\zWaG" ?á‹Ÿ)
+
+ ("\\ZeG" ?á‹ ) ; U+12E0 ..
+ ("\\ZuG" ?á‹¡)
+ ("\\ZiG" ?á‹¢)
+ ("\\ZaG" ?á‹£)
+ ("\\ZEG" ?ዤ)
+ ("\\ZG" ?á‹¥)
+ ("\\ZoG" ?ዦ)
+ ("\\ZWaG" ?ዧ)
+ ("\\yeG" ?የ)
+ ("\\yuG" ?á‹©)
+ ("\\yiG" ?ዪ)
+ ("\\yaG" ?á‹«)
+ ("\\yEG" ?ዬ)
+ ("\\yG" ?á‹­)
+ ("\\yoG" ?á‹®)
+ ;; reserved
+
+ ("\\deG" ?á‹°) ; U+12F0 ..
+ ("\\duG" ?ዱ)
+ ("\\diG" ?ዲ)
+ ("\\daG" ?ዳ)
+ ("\\dEG" ?á‹´)
+ ("\\dG" ?ድ)
+ ("\\doG" ?ዶ)
+ ("\\dWaG" ?á‹·)
+ ("\\DeG" ?ዸ)
+ ("\\DuG" ?ዹ)
+ ("\\DiG" ?ዺ)
+ ("\\DaG" ?á‹»)
+ ("\\DEG" ?ዼ)
+ ("\\DG" ?ዽ)
+ ("\\DoG" ?ዾ)
+ ("\\DWaG" ?á‹¿)
+
+ ("\\jeG" ?ጀ) ; U+1300 ..
+ ("\\juG" ?áŒ)
+ ("\\jiG" ?ጂ)
+ ("\\jaG" ?ጃ)
+ ("\\jEG" ?ጄ)
+ ("\\jG" ?ጅ)
+ ("\\joG" ?ጆ)
+ ("\\jWaG" ?ጇ)
+ ("\\geG" ?ገ)
+ ("\\guG" ?ጉ)
+ ("\\giG" ?ጊ)
+ ("\\gaG" ?ጋ)
+ ("\\gEG" ?ጌ)
+ ("\\gG" ?áŒ)
+ ("\\goG" ?ጎ)
+ ;; reserved
+
+ ("\\gWeG" ?áŒ) ; U+1310 ..
+ ;; reserved
+ ("\\gWiG" ?ጒ)
+ ("\\gWaG" ?ጓ)
+ ("\\gWEG" ?ጔ)
+ ("\\gWG" ?ጕ)
+ ;; reserved
+ ;; reserved
+ ("\\GeG" ?ጘ)
+ ("\\GuG" ?ጙ)
+ ("\\GiG" ?ጚ)
+ ("\\GaG" ?ጛ)
+ ("\\GEG" ?ጜ)
+ ("\\GG" ?áŒ)
+ ("\\GoG" ?ጞ)
+ ;; reserved
+
+ ("\\TeG" ?ጠ) ; U+1320 ..
+ ("\\TuG" ?ጡ)
+ ("\\TiG" ?ጢ)
+ ("\\TaG" ?ጣ)
+ ("\\TEG" ?ጤ)
+ ("\\TG" ?ጥ)
+ ("\\ToG" ?ጦ)
+ ("\\TWaG" ?ጧ)
+ ("\\CeG" ?ጨ)
+ ("\\CuG" ?ጩ)
+ ("\\CiG" ?ጪ)
+ ("\\CaG" ?ጫ)
+ ("\\CEG" ?ጬ)
+ ("\\CG" ?ጭ)
+ ("\\CoG" ?ጮ)
+ ("\\CWaG" ?ጯ)
+
+ ("\\PeG" ?ጰ) ; U+1330 ..
+ ("\\PuG" ?ጱ)
+ ("\\PiG" ?ጲ)
+ ("\\PaG" ?ጳ)
+ ("\\PEG" ?ጴ)
+ ("\\PG" ?ጵ)
+ ("\\PoG" ?ጶ)
+ ("\\PWaG" ?ጷ)
+ ("\\SeG" ?ጸ)
+ ("\\SuG" ?ጹ)
+ ("\\SiG" ?ጺ)
+ ("\\SaG" ?ጻ)
+ ("\\SEG" ?ጼ)
+ ("\\SG" ?ጽ)
+ ("\\SoG" ?ጾ)
+ ("\\SWaG" ?ጿ)
+
+ ("\\SSeG" ?á€) ; U+1340 ..
+ ("\\SSuG" ?á)
+ ("\\SSiG" ?á‚)
+ ("\\SSaG" ?áƒ)
+ ("\\SSEG" ?á„)
+ ("\\SSG" ?á…)
+ ("\\SSoG" ?á†)
+ ;; reserved
+ ("\\feG" ?áˆ)
+ ("\\fuG" ?á‰)
+ ("\\fiG" ?áŠ)
+ ("\\faG" ?á‹)
+ ("\\fEG" ?áŒ)
+ ("\\fG" ?á)
+ ("\\foG" ?áŽ)
+ ("\\fWaG" ?á)
+
+ ("\\peG" ?á) ; U+1350 ..
+ ("\\puG" ?á‘)
+ ("\\piG" ?á’)
+ ("\\paG" ?á“)
+ ("\\pEG" ?á”)
+ ("\\pG" ?á•)
+ ("\\poG" ?á–)
+ ("\\pWaG" ?á—)
+ ("\\mYaG" ?á˜)
+ ("\\rYaG" ?á™)
+ ("\\fYaG" ?áš)
+ ;; reserved
+ ;; reserved
+ ;; reserved
+ ;; reserved
+ ;; reserved
+
+ ;; reserved ; U+1360 ..
+ ("\\spaceG" ?á¡)
+ ("\\periodG" ?á¢)
+ ("\\commaG" ?á£)
+ ("\\semicolonG" ?á¤)
+ ("\\colonG" ?á¥)
+ ("\\precolonG" ?á¦)
+ ("\\oldqmarkG" ?á§)
+ ("\\pbreakG" ?á¨)
+ ("\\andG" ?á©)
+ ("\\huletG" ?áª)
+ ("\\sostG" ?á«)
+ ("\\aratG" ?á¬)
+ ("\\amstG" ?á­)
+ ("\\sadstG" ?á®)
+ ("\\sabatG" ?á¯)
+
+ ("\\smntG" ?á°) ; U+1370 ..
+ ("\\zeteNG" ?á±)
+ ("\\asrG" ?á²)
+ ("\\heyaG" ?á³)
+ ("\\selasaG" ?á´)
+ ("\\arbaG" ?áµ)
+ ("\\hemsaG" ?á¶)
+ ("\\slsaG" ?á·)
+ ("\\sebaG" ?á¸)
+ ("\\semanyaG" ?á¹)
+ ("\\zeTanaG" ?áº)
+ ("\\metoG" ?á»)
+ ("\\asrxiG" ?á¼)
+ ;; reserved
+ ;; reserved
+ ;; reserved
+
+ ;;
+ ;; private extension
+ ;;
+
+ ("\\yWaG" ?ö ƒ¯) ; U+1A00EF (was U+12EF)
+
+ ("\\GWaG" ?ö „Ÿ) ; U+1A011F (was U+131F)
+
+ ("\\qqeG" ?ö †€) ; U+1A0180 .. (was U+1380 ..)
+ ("\\qquG" ?ö †)
+ ("\\qqiG" ?ö †‚)
+ ("\\qqaG" ?ö †ƒ)
+ ("\\qqEG" ?ö †„)
+ ("\\qqG" ?ö †…)
+ ("\\qqoG" ?ö ††)
+ ;; unused
+ ("\\MWeG" ?ö †ˆ)
+ ("\\bWeG" ?ö †‰)
+ ("\\GWeG" ?ö †Š)
+ ("\\fWeG" ?ö †‹)
+ ("\\pWeG" ?ö †Œ)
+ ;; unused
+ ;; unused
+ ;; unused
+
+ ("\\kkeG" ?ö †) ; U+1A0190 .. (was U+1390 ..)
+ ("\\kkuG" ?ö †‘)
+ ("\\kkiG" ?ö †’)
+ ("\\kkaG" ?ö †“)
+ ("\\kkEG" ?ö †”)
+ ("\\kkG" ?ö †•)
+ ("\\kkoG" ?ö †–)
+ ;; unused
+ ("\\mWiG" ?ö †˜)
+ ("\\bWiG" ?ö †™)
+ ("\\GWiG" ?ö †š)
+ ("\\fWiG" ?ö †›)
+ ("\\pWiG" ?ö †œ)
+ ;; unused
+ ;; unused
+ ;; unused
+
+ ("\\XeG" ?ö † ) ; U+1A01A0 .. (was U+13A0 ..)
+ ("\\XuG" ?ö †¡)
+ ("\\XiG" ?ö †¢)
+ ("\\XaG" ?ö †£)
+ ("\\XEG" ?ö †¤)
+ ("\\XG" ?ö †¥)
+ ("\\XoG" ?ö †¦)
+ ;; unused
+ ("\\mWEG" ?ö †¨)
+ ("\\bWEG" ?ö †©)
+ ("\\GWEG" ?ö †ª)
+ ("\\fWEG" ?ö †«)
+ ("\\pWEG" ?ö †¬)
+ ;; unused
+ ;; unused
+ ;; unused
+
+ ("\\ggeG" ?ö †°) ; U+1A01B0 .. (was U+13B0 ..)
+ ("\\gguG" ?ö †±)
+ ("\\ggiG" ?ö †²)
+ ("\\ggaG" ?ö †³)
+ ("\\ggEG" ?ö †´)
+ ("\\ggG" ?ö †µ)
+ ("\\ggoG" ?ö †¶)
+ ;; unused
+ ("\\mWG" ?ö †¸)
+ ("\\bWG" ?ö †¹)
+ ("\\GWG" ?ö †º)
+ ("\\fWG" ?ö †»)
+ ("\\pWG" ?ö †¼)
+ ;; unused
+ ;; unused
+ ;; unused
+
+ ("\\ornamentG" ?ö ‡€) ; U+1A01C0 .. (was U+FDF0 ..)
+ ("\\flandG" ?ö ‡)
+ ("\\iflandG" ?ö ‡‚)
+ ("\\africaG" ?ö ‡ƒ)
+ ("\\iafricaG" ?ö ‡„)
+ ("\\wWeG" ?ö ‡…)
+ ("\\wWiG" ?ö ‡†)
+ ("\\wWaG" ?ö ‡‡)
+ ("\\wWEG" ?ö ‡ˆ)
+ ("\\wWG" ?ö ‡‰)
+ ;; Gemination (ö ‡Š) is handled in a special way.
+ ("\\slaqG" ?ö ‡‹)
+
+ ;; Assign reverse conversion to Fidel chars.
+ ;; Then override forward conversion with ASCII chars.
+ ;; ASCII chars should not have reverse conversions.
+ ("\\dotG" ?ö ‡Œ) ("\\dotG" ".")
+ ("\\lquoteG" ?ö ‡) ("\\lquoteG" "«")
+ ("\\rquoteG" ?ö ‡Ž) ("\\rquoteG" "»")
+ ("\\qmarkG" ?ö ‡) ("\\qmarkG" "?")
+
+ ;;
+ ;; New characters in Unicode 4.1.
+ ;;
+ ;; In forward conversion, these characters override the old private
+ ;; extensions above. The old private extensions still keep their
+ ;; reverse conversion.
+ ;;
+
+ ("\\ornamentG" ?á )
+ ("\\yWaG" ?ዯ)
+ ("\\GWaG" ?ጟ)
+ ("\\MWeG" ?ᎀ)
+ ("\\mWiG" ?áŽ)
+ ("\\mWEG" ?ᎂ)
+ ("\\mWG" ?ᎃ)
+ ("\\bWeG" ?ᎄ)
+ ("\\bWiG" ?ᎅ)
+ ("\\bWEG" ?ᎆ)
+ ("\\bWG" ?ᎇ)
+ ("\\fWeG" ?ᎈ)
+ ("\\fWiG" ?ᎉ)
+ ("\\fWEG" ?ᎊ)
+ ("\\fWG" ?ᎋ)
+ ("\\pWeG" ?ᎌ)
+ ("\\pWiG" ?áŽ)
+ ("\\pWEG" ?ᎎ)
+ ("\\pWG" ?áŽ)
+ ("\\GWeG" ?ⶓ)
+ ("\\GWiG" ?ⶔ)
+ ("\\GWEG" ?ⶕ)
+ ("\\GWG" ?ⶖ)
+ ("\\qqeG" ?â·€)
+ ("\\qquG" ?â·)
+ ("\\qqiG" ?â·‚)
+ ("\\qqaG" ?â·ƒ)
+ ("\\qqEG" ?â·„)
+ ("\\qqG" ?â·…)
+ ("\\qqoG" ?â·†)
+ ("\\kkeG" ?â·ˆ)
+ ("\\kkuG" ?â·‰)
+ ("\\kkiG" ?â·Š)
+ ("\\kkaG" ?â·‹)
+ ("\\kkEG" ?ⷌ)
+ ("\\kkG" ?â·)
+ ("\\kkoG" ?â·Ž)
+ ("\\XeG" ?â·)
+ ("\\XuG" ?â·‘)
+ ("\\XiG" ?â·’)
+ ("\\XaG" ?â·“)
+ ("\\XEG" ?â·”)
+ ("\\XG" ?â·•)
+ ("\\XoG" ?â·–)
+ ("\\ggeG" ?â·˜)
+ ("\\gguG" ?â·™)
+ ("\\ggiG" ?â·š)
+ ("\\ggaG" ?â·›)
+ ("\\ggEG" ?ⷜ)
+ ("\\ggG" ?â·)
+ ("\\ggoG" ?â·ž)
+ )
+
+;; The ethiopic-tex package is not used for keyboard input, therefore
+;; not registered with the register-input-method function.
-;;
(provide 'ethio-util)
+;;; ethio-util.el ends here
+
;;; arch-tag: c8feb3d6-39bf-4b0a-b6ef-26f03fbc8140
;;; ethio-util.el ends here
diff --git a/lisp/language/ethiopic.el b/lisp/language/ethiopic.el
index 29679a8ca73..3772dceae1e 100644
--- a/lisp/language/ethiopic.el
+++ b/lisp/language/ethiopic.el
@@ -1,4 +1,4 @@
-;;; ethiopic.el --- support for Ethiopic -*- coding: iso-2022-7bit; -*-
+;;; ethiopic.el --- support for Ethiopic -*- coding: utf-8-emacs; -*-
;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006
;; Free Software Foundation, Inc.
@@ -44,10 +44,10 @@
(r1 *= 94)
(r2 += r1)
(if (r2 < 256)
- (r1 = ?\x12)
+ (r1 = #x12)
(if (r2 < 448)
- ((r1 = ?\x13) (r2 -= 256))
- ((r1 = ?\xfd) (r2 -= 208))
+ ((r1 = #x13) (r2 -= 256))
+ ((r1 = #xfd) (r2 -= 208))
))))
"CCL program to encode an Ethiopic code to code point of Ethiopic font.")
@@ -58,30 +58,33 @@
"Ethiopic" '((setup-function . setup-ethiopic-environment-internal)
(exit-function . exit-ethiopic-environment)
(charset ethiopic)
- (coding-system iso-2022-7bit)
- (coding-priority iso-2022-7bit)
+ (coding-system utf-8-emacs)
+ (coding-priority utf-8-emacs)
(input-method . "ethiopic")
(features ethio-util)
- (sample-text . "$(3$Q#U!.(B")
+ (sample-text . "áŠá‹°áˆ")
(documentation .
-"This language envrironment provides these function key bindings
- \(old bindings are shown in parentheses):
- [f3] ethio-fidel-to-sera-buffer (f5)
- [S-f3] ethio-fidel-to-sera-region (f5)
- [C-f3] ethio-fidel-to-sera-mail-or-marker (f5)
-
- [f4] ethio-sera-to-fidel-buffer (unchanged)
- [S-f4] ethio-sera-to-fidel-region (unchanged)
- [C-f4] ethio-sera-to-fidel-mail-or-marker (unchanged)
-
- [S-f5] ethio-toggle-punctuation (f3)
- [S-f6] ethio-modify-vowel (f6)
- [S-f7] ethio-replace-space (f7)
- [S-f8] ethio-input-special-character (f8)
- [S-f9] ethio-replace-space (unchanged)
- [C-f9] ethio-toggle-space (f2)"
+"This language envrironment provides these function key bindings:
+ [f3] ethio-fidel-to-sera-buffer
+ [S-f3] ethio-fidel-to-sera-region
+ [C-f3] ethio-fidel-to-sera-marker
+
+ [f4] ethio-sera-to-fidel-buffer
+ [S-f4] ethio-sera-to-fidel-region
+ [C-f4] ethio-sera-to-fidel-marker
+
+ [S-f5] ethio-toggle-punctuation
+ [S-f6] ethio-modify-vowel
+ [S-f7] ethio-replace-space
+
+ [S-f9] ethio-replace-space
+ [C-f9] ethio-toggle-space"
)))
+;; For automatic composition
+(aset composition-function-table ?ö ‡Š 'ethio-composition-function)
+(aset composition-function-table ?០'ethio-composition-function)
+
(provide 'ethiopic)
;;; arch-tag: e81329d9-1286-43ba-92fd-54ce5c7b213c
diff --git a/lisp/language/european.el b/lisp/language/european.el
index 60401e56ab1..ecdca8b20f4 100644
--- a/lisp/language/european.el
+++ b/lisp/language/european.el
@@ -6,6 +6,9 @@
;; 2005, 2006
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
+;; Copyright (C) 2003
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H13PRO009
;; Keywords: multilingual, European
@@ -36,15 +39,14 @@
;; Latin-1 (ISO-8859-1)
(set-language-info-alist
- "Latin-1" '((charset ascii latin-iso8859-1)
- (coding-system iso-latin-1)
- (coding-priority iso-latin-1 windows-1252)
- (nonascii-translation . latin-iso8859-1)
- (unibyte-syntax . "latin-1")
+ "Latin-1" '((charset iso-8859-1)
+ (coding-system iso-latin-1 iso-latin-9 windows-1252)
+ (coding-priority iso-latin-1)
+ (nonascii-translation . iso-8859-1)
(unibyte-display . iso-latin-1)
(input-method . "latin-1-prefix")
(sample-text
- . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!")
+ . "Hello, Hej, Tere, Hei, Bonjour, Gr$(D+d)N(B Gott, Ciao, $(D"B(BHola!")
(documentation . "\
This language environment is a generic one for the Latin-1 (ISO-8859-1)
character set which supports the following European languages:
@@ -65,42 +67,24 @@ Latin-1 also covers several written languages outside Europe, including
Indonesian/Malay, Tagalog (Philippines), Swahili and Afrikaans."))
'("European"))
-(eval-and-compile
- (setq
- non-iso-charset-alist
- (cp-make-coding-system
- windows-1252
- [?\$,1tL(B nil ?\$,1rz(B ?\$,1!R(B ?\$,1r~(B ?\$,1s&(B ?\$,1s (B ?\$,1s!(B ?\$,1$f(B ?\$,1s0(B ?\$,1! (B ?\$,1s9(B ?\$,1 r(B nil ?\$,1!=(B nil nil
- ?\$,1rx(B ?\$,1ry(B ?\$,1r|(B ?\$,1r}(B ?\$,1s"(B ?\$,1rs(B ?\$,1rt(B ?\$,1$|(B ?\$,1ub(B ?\$,1!!(B ?\$,1s:(B ?\$,1 s(B nil ?\$,1!>(B ?\$,1!8(B ?\,A (B ?\,A!(B
- ?\,A"(B ?\,A#(B ?\,A$(B ?\,A%(B ?\,A&(B ?\,A'(B ?\,A((B ?\,A)(B ?\,A*(B ?\,A+(B ?\,A,(B ?\,A-(B ?\,A.(B ?\,A/(B ?\,A0(B ?\,A1(B ?\,A2(B
- ?\,A3(B ?\,A4(B ?\,A5(B ?\,A6(B ?\,A7(B ?\,A8(B ?\,A9(B ?\,A:(B ?\,A;(B ?\,A<(B ?\,A=(B ?\,A>(B ?\,A?(B ?\,A@(B ?\,AA(B ?\,AB(B ?\,AC(B
- ?\,AD(B ?\,AE(B ?\,AF(B ?\,AG(B ?\,AH(B ?\,AI(B ?\,AJ(B ?\,AK(B ?\,AL(B ?\,AM(B ?\,AN(B ?\,AO(B ?\,AP(B ?\,AQ(B ?\,AR(B ?\,AS(B ?\,AT(B
- ?\,AU(B ?\,AV(B ?\,AW(B ?\,AX(B ?\,AY(B ?\,AZ(B ?\,A[(B ?\,A\(B ?\,A](B ?\,A^(B ?\,A_(B ?\,A`(B ?\,Aa(B ?\,Ab(B ?\,Ac(B ?\,Ad(B ?\,Ae(B
- ?\,Af(B ?\,Ag(B ?\,Ah(B ?\,Ai(B ?\,Aj(B ?\,Ak(B ?\,Al(B ?\,Am(B ?\,An(B ?\,Ao(B ?\,Ap(B ?\,Aq(B ?\,Ar(B ?\,As(B ?\,At(B ?\,Au(B ?\,Av(B
- ?\,Aw(B ?\,Ax(B ?\,Ay(B ?\,Az(B ?\,A{(B ?\,A|(B ?\,A}(B ?\,A~(B ?\,A(B])))
-
-(define-coding-system-alias 'cp1252 'windows-1252)
-
;; Latin-2 (ISO-8859-2)
-(make-coding-system
- 'iso-latin-2 2 ?2
- "ISO 2022 based 8-bit encoding for Latin-2 (MIME:ISO-8859-2)."
- '(ascii latin-iso8859-2 nil nil
- nil nil nil nil nil nil nil nil nil nil nil t)
- '((safe-charsets ascii latin-iso8859-2)
- (mime-charset . iso-8859-2)))
+(define-coding-system 'iso-latin-2
+ "ISO 2022 based 8-bit encoding for Latin-2 (MIME:ISO-8859-2)."
+ :coding-type 'charset
+ :mnemonic ?2
+ :charset-list '(iso-8859-2)
+ :mime-charset 'iso-8859-2)
(define-coding-system-alias 'iso-8859-2 'iso-latin-2)
(define-coding-system-alias 'latin-2 'iso-latin-2)
(set-language-info-alist
- "Latin-2" '((charset ascii latin-iso8859-2)
- (coding-system iso-latin-2)
+ "Latin-2" '((charset iso-8859-2)
+ (coding-system iso-latin-2 windows-1250)
(coding-priority iso-latin-2)
- (nonascii-translation . latin-iso8859-2)
- (unibyte-syntax . "latin-2")
+ (nonascii-translation . iso-8859-2)
(unibyte-display . iso-latin-2)
(input-method . "latin-2-prefix")
(documentation . "\
@@ -112,6 +96,7 @@ character set which supports the following languages:
We also have specific language environments for the following languages:
For Czech, \"Czech\".
For Croatian, \"Croatian\".
+ For Polish, \"Polish\".
For Romanian, \"Romanian\".
For Slovak, \"Slovak\"."))
'("European"))
@@ -119,23 +104,21 @@ We also have specific language environments for the following languages:
;; Latin-3 (ISO-8859-3)
-(make-coding-system
- 'iso-latin-3 2 ?3
- "ISO 2022 based 8-bit encoding for Latin-3 (MIME:ISO-8859-3)."
- '(ascii latin-iso8859-3 nil nil
- nil nil nil nil nil nil nil nil nil nil nil t)
- '((safe-charsets ascii latin-iso8859-3)
- (mime-charset . iso-8859-3)))
+(define-coding-system 'iso-latin-3
+ "ISO 2022 based 8-bit encoding for Latin-3 (MIME:ISO-8859-3)."
+ :coding-type 'charset
+ :mnemonic ?3
+ :charset-list '(iso-8859-3)
+ :mime-charset 'iso-8859-3)
(define-coding-system-alias 'iso-8859-3 'iso-latin-3)
(define-coding-system-alias 'latin-3 'iso-latin-3)
(set-language-info-alist
- "Latin-3" '((charset ascii latin-iso8859-3)
+ "Latin-3" '((charset iso-8859-3)
(coding-system iso-latin-3)
(coding-priority iso-latin-3)
- (nonascii-translation . latin-iso8859-3)
- (unibyte-syntax . "latin-3")
+ (nonascii-translation . iso-8859-3)
(unibyte-display . iso-latin-3)
(input-method . "latin-3-prefix")
(documentation . "\
@@ -147,23 +130,21 @@ These languages are supported with the Latin-3 (ISO-8859-3) character set:
;; Latin-4 (ISO-8859-4)
-(make-coding-system
- 'iso-latin-4 2 ?4
- "ISO 2022 based 8-bit encoding for Latin-4 (MIME:ISO-8859-4)."
- '(ascii latin-iso8859-4 nil nil
- nil nil nil nil nil nil nil nil nil nil nil t)
- '((safe-charsets ascii latin-iso8859-4)
- (mime-charset . iso-8859-4)))
+(define-coding-system 'iso-latin-4
+ "ISO 2022 based 8-bit encoding for Latin-4 (MIME:ISO-8859-4)."
+ :coding-type 'charset
+ :mnemonic ?4
+ :charset-list '(iso-8859-4)
+ :mime-charset 'iso-8859-4)
(define-coding-system-alias 'iso-8859-4 'iso-latin-4)
(define-coding-system-alias 'latin-4 'iso-latin-4)
(set-language-info-alist
- "Latin-4" '((charset ascii latin-iso8859-4)
+ "Latin-4" '((charset iso-8859-4)
(coding-system iso-8859-4)
(coding-priority iso-8859-4)
- (nonascii-translation . latin-iso8859-4)
- (unibyte-syntax . "latin-4")
+ (nonascii-translation . iso-8859-4)
(unibyte-display . iso-8859-4)
(input-method . "latin-4-postfix")
(documentation . "\
@@ -175,53 +156,95 @@ These languages are supported with the Latin-4 (ISO-8859-4) character set:
;; Latin-5 (ISO-8859-9)
-(make-coding-system
- 'iso-latin-5 2 ?9
- "ISO 2022 based 8-bit encoding for Latin-5 (MIME:ISO-8859-9)."
- '(ascii latin-iso8859-9 nil nil
- nil nil nil nil nil nil nil nil nil nil nil t)
- '((safe-charsets ascii latin-iso8859-9)
- (mime-charset . iso-8859-9)))
+(define-coding-system 'iso-latin-5
+ "ISO 2022 based 8-bit encoding for Latin-5 (MIME:ISO-8859-9)."
+ :coding-type 'charset
+ :mnemonic ?9
+ :charset-list '(iso-8859-9)
+ :mime-charset 'iso-8859-9)
(define-coding-system-alias 'iso-8859-9 'iso-latin-5)
(define-coding-system-alias 'latin-5 'iso-latin-5)
(set-language-info-alist
- "Latin-5" '((charset ascii latin-iso8859-9)
+ "Latin-5" '((charset iso-8859-9)
(coding-system iso-latin-5)
(coding-priority iso-latin-5)
- (nonascii-translation . latin-iso8859-9)
- (unibyte-syntax . "latin-5")
+ (nonascii-translation . iso-8859-9)
(unibyte-display . iso-latin-5)
(input-method . "latin-5-postfix")
- (documentation . "Support for Turkish language."))
+ (documentation . "Support for Latin-5.\
+See also the Turkish environment."))
'("European"))
+;; Latin-6 (ISO-8859-10)
+
+(define-coding-system 'iso-latin-6
+ "ISO 2022 based 8-bit encoding for Latin-6 (MIME:ISO-8859-10)."
+ :coding-type 'charset
+ :mnemonic ?9
+ :charset-list '(iso-8859-10)
+ :mime-charset 'iso-8859-10)
+
+(define-coding-system-alias 'iso-8859-10 'iso-latin-6)
+(define-coding-system-alias 'latin-6 'iso-latin-6)
+
+(set-language-info-alist
+ "Latin-6" '((charset iso-8859-10)
+ (coding-system iso-latin-6)
+ (coding-priority iso-latin-6)
+ (nonascii-translation . iso-8859-10)
+ (unibyte-display . iso-latin-6)
+ ;; Fixme: input method.
+ (documentation . "Support for generic Latin-6 (Northern European)."))
+ '("European"))
+
+
+;; Latin-7 (ISO-8859-13)
+
+(define-coding-system 'iso-latin-7
+ "ISO 2022 based 8-bit encoding for Latin-7 (MIME:ISO-8859-13)."
+ :coding-type 'charset
+ :mnemonic ?9
+ :charset-list '(iso-8859-13)
+ :mime-charset 'iso-8859-13)
+
+(define-coding-system-alias 'iso-8859-13 'iso-latin-7)
+(define-coding-system-alias 'latin-7 'iso-latin-7)
+
+(set-language-info-alist
+ "Latin-7" '((charset iso-8859-13)
+ (coding-system iso-latin-7)
+ (coding-priority iso-latin-7)
+ (nonascii-translation . iso-8859-13)
+ (unibyte-display . iso-latin-7)
+ ;; Fixme: input method.
+ (documentation . "Support for generic Latin-7 (Baltic Rim)."))
+ '("European"))
+
;; Latin-8 (ISO-8859-14)
-(make-coding-system
- 'iso-latin-8 2 ?W ; `W' for `Welsh', since `C'
- ; for `Celtic' is taken.
- "ISO 2022 based 8-bit encoding for Latin-8 (MIME:ISO-8859-14)."
- '(ascii latin-iso8859-14 nil nil
- nil nil nil nil nil nil nil nil nil nil nil t t)
- '((safe-charsets ascii latin-iso8859-14)
- (mime-charset . iso-8859-14)))
+(define-coding-system 'iso-latin-8
+ "ISO 2022 based 8-bit encoding for Latin-8 (MIME:ISO-8859-14)."
+ :coding-type 'charset
+ ;; `W' for `Welsh', since `C' for `Celtic' is taken.
+ :mnemonic ?W
+ :charset-list '(iso-8859-14)
+ :mime-charset 'iso-8859-14)
(define-coding-system-alias 'iso-8859-14 'iso-latin-8)
(define-coding-system-alias 'latin-8 'iso-latin-8)
(set-language-info-alist
- "Latin-8" '((charset ascii latin-iso8859-14)
+ "Latin-8" '((charset iso-8859-14)
(coding-system iso-latin-8)
(coding-priority iso-latin-8)
- (nonascii-translation . latin-iso8859-14)
- (unibyte-syntax . "latin-8")
+ (nonascii-translation . iso-8859-14)
(unibyte-display . iso-latin-8)
(input-method . "latin-8-prefix")
;; Fixme: Welsh/Ga{e}lic greetings
- (sample-text . ",_"(B ,_p(B ,_^(B")
+ (sample-text . ",_"(B $(D+q(B $(D*t(B")
(documentation . "\
This language environment is a generic one for the Latin-8 (ISO-8859-14)
character set which supports the Celtic languages, including those not
@@ -231,28 +254,27 @@ covered by other ISO-8859 character sets:
;; Latin-9 (ISO-8859-15)
-(make-coding-system
- 'iso-latin-9 2 ?0 ; `0' for `Latin-0'
- "ISO 2022 based 8-bit encoding for Latin-9 (MIME:ISO-8859-15)."
- '(ascii latin-iso8859-15 nil nil
- nil nil nil nil nil nil nil nil nil nil nil t t)
- '((safe-charsets ascii latin-iso8859-15)
- (mime-charset . iso-8859-15)))
+(define-coding-system 'iso-latin-9
+ "ISO 2022 based 8-bit encoding for Latin-9 (MIME:ISO-8859-15)."
+ :coding-type 'charset
+ ;; `0' for `Latin-0'
+ :mnemonic ?0
+ :charset-list '(iso-8859-15)
+ :mime-charset 'iso-8859-15)
(define-coding-system-alias 'iso-8859-15 'iso-latin-9)
(define-coding-system-alias 'latin-9 'iso-latin-9)
(define-coding-system-alias 'latin-0 'iso-latin-9)
(set-language-info-alist
- "Latin-9" '((charset ascii latin-iso8859-15)
+ "Latin-9" '((charset iso-8859-15)
(coding-system iso-latin-9)
(coding-priority iso-latin-9)
- (nonascii-translation . latin-iso8859-15)
- (unibyte-syntax . "latin-9")
+ (nonascii-translation . iso-8859-15)
(unibyte-display . iso-latin-9)
(input-method . "latin-9-prefix")
(sample-text
- . "AVE. ,b&(48<=>(B ,b$(B")
+ . "AVE. $(D*^+^*v+v)-)M*s(B $(Q)!(B")
(documentation . "\
This language environment is a generic one for the Latin-9 (ISO-8859-15)
character set which supports the same languages as Latin-1 with the
@@ -260,13 +282,115 @@ addition of the Euro sign and some additional French and Finnish letters.
Latin-9 is sometimes nicknamed `Latin-0'."))
'("European"))
+(define-coding-system 'windows-1250
+ "windows-1250 (Central European) encoding (MIME: WINDOWS-1250)"
+ :coding-type 'charset
+ :mnemonic ?*
+ :charset-list '(windows-1250)
+ :mime-charset 'windows-1250)
+(define-coding-system-alias 'cp1250 'windows-1250)
+
+(define-coding-system 'windows-1252
+ "windows-1252 (Western European) encoding (MIME: WINDOWS-1252)"
+ :coding-type 'charset
+ :mnemonic ?*
+ :charset-list '(windows-1252)
+ :mime-charset 'windows-1252)
+(define-coding-system-alias 'cp1252 'windows-1252)
+
+(define-coding-system 'windows-1254
+ "windows-1254 (Turkish) encoding (MIME: WINDOWS-1254)"
+ :coding-type 'charset
+ :mnemonic ?*
+ :charset-list '(windows-1254)
+ :mime-charset 'windows-1254)
+(define-coding-system-alias 'cp1254 'windows-1254)
+
+(define-coding-system 'windows-1257
+ "windows-1257 (Baltic) encoding (MIME: WINDOWS-1257)"
+ :coding-type 'charset
+ :mnemonic ?*
+ :charset-list '(windows-1257)
+ :mime-charset 'windows-1257)
+(define-coding-system-alias 'cp1257 'windows-1257)
+
+(define-coding-system 'cp850
+ "DOS codepage 850 (Western European)"
+ :coding-type 'charset
+ :mnemonic ?D
+ :charset-list '(cp850)
+ :mime-charset 'cp850)
+(define-coding-system-alias 'ibm850 'cp850)
+
+(define-coding-system 'cp852
+ "DOS codepage 852 (Slavic)"
+ :coding-type 'charset
+ :mnemonic ?D
+ :charset-list '(cp852)
+ :mime-charset 'cp852)
+(define-coding-system-alias 'ibm852 'cp852)
+
+(define-coding-system 'cp857
+ "DOS codepage 857 (Turkish)"
+ :coding-type 'charset
+ :mnemonic ?D
+ :charset-list '(cp857)
+ :mime-charset 'cp857)
+(define-coding-system-alias 'ibm857 'cp857)
+
+(define-coding-system 'cp858
+ "Codepage 858 (Multilingual Latin I + Euro)"
+ :coding-type 'charset
+ :mnemonic ?D
+ :charset-list '(cp858)
+ :mime-charset 'cp858)
+
+(define-coding-system 'cp860
+ "DOS codepage 860 (Portuguese)"
+ :coding-type 'charset
+ :mnemonic ?D
+ :charset-list '(cp860)
+ :mime-charset 'cp860)
+(define-coding-system-alias 'ibm860 'cp860)
+
+(define-coding-system 'cp861
+ "DOS codepage 861 (Icelandic)"
+ :coding-type 'charset
+ :mnemonic ?D
+ :charset-list '(cp861)
+ :mime-charset 'cp861)
+(define-coding-system-alias 'ibm861 'cp861)
+
+(define-coding-system 'cp863
+ "DOS codepage 863 (French Canadian)"
+ :coding-type 'charset
+ :mnemonic ?D
+ :charset-list '(cp863)
+ :mime-charset 'cp863)
+(define-coding-system-alias 'ibm863 'cp863)
+
+(define-coding-system 'cp865
+ "DOS codepage 865 (Norwegian/Danish)"
+ :coding-type 'charset
+ :mnemonic ?D
+ :charset-list '(cp865)
+ :mime-charset 'cp865)
+(define-coding-system-alias 'ibm865 'cp865)
+
+(define-coding-system 'cp437
+ "DOS codepage 437"
+ :coding-type 'charset
+ :mnemonic ?D
+ :charset-list '(cp437)
+ :mime-charset 'cp437)
+(define-coding-system-alias 'ibm437 'cp437)
+
(set-language-info-alist
"Dutch" '((tutorial . "TUTORIAL.nl")
- (charset ascii latin-iso8859-1)
+ (charset iso-8859-1)
(coding-system iso-latin-1 iso-latin-9)
(coding-priority iso-latin-1)
- (nonascii-translation . latin-iso8859-1)
- (unibyte-syntax . "latin-1")
+ (nonascii-translation . iso-8859-1)
(unibyte-display . iso-latin-1)
(input-method . "dutch")
(sample-text . "Er is een aantal manieren waarop je dit kan doen")
@@ -277,16 +401,15 @@ but it selects the Dutch tutorial and input method."))
(set-language-info-alist
"German" '((tutorial . "TUTORIAL.de")
- (charset ascii latin-iso8859-1)
+ (charset iso-8859-1)
(coding-system iso-latin-1 iso-latin-9)
- (coding-priority iso-latin-1 windows-1252)
+ (coding-priority iso-latin-1)
+ (nonascii-translation . iso-8859-1)
(input-method . "german-postfix")
- (nonascii-translation . latin-iso8859-1)
- (unibyte-syntax . "latin-1")
(unibyte-display . iso-latin-1)
(sample-text . "\
German (Deutsch Nord) Guten Tag
-German (Deutsch S,A|(Bd) Gr,A|_(B Gott")
+German (Deutsch S$(D+d(Bd) Gr$(D+d)N(B Gott")
(documentation . "\
This language environment is almost the same as Latin-1,
but sets the default input method to \"german-postfix\".
@@ -295,14 +418,13 @@ Additionally, it selects the German tutorial."))
(set-language-info-alist
"French" '((tutorial . "TUTORIAL.fr")
- (charset ascii latin-iso8859-1)
+ (charset iso-8859-1)
(coding-system iso-latin-1 iso-latin-9)
(coding-priority iso-latin-1)
- (nonascii-translation . latin-iso8859-1)
- (unibyte-syntax . "latin-1")
+ (nonascii-translation . iso-8859-1)
(unibyte-display . iso-latin-1)
(input-method . "latin-1-prefix")
- (sample-text . "French (Fran,Ag(Bais) Bonjour, Salut")
+ (sample-text . "French (Fran$(D+.(Bais) Bonjour, Salut")
(documentation . "\
This language environment is almost the same as Latin-1,
but it selects the French tutorial and input method."))
@@ -310,11 +432,10 @@ but it selects the French tutorial and input method."))
(set-language-info-alist
"Italian" '((tutorial . "TUTORIAL.it")
- (charset ascii latin-iso8859-1)
+ (charset iso-8859-1)
(coding-system iso-latin-1 iso-latin-9)
(coding-priority iso-latin-1)
- (nonascii-translation . latin-iso8859-1)
- (unibyte-syntax . "latin-1")
+ (nonascii-translation . iso-8859-1)
(unibyte-display . iso-latin-1)
(input-method . "italian-postfix")
(sample-text . "Salve, ciao!")
@@ -325,15 +446,14 @@ Additionally, it selects the Italian tutorial."))
'("European"))
(set-language-info-alist
- "Slovenian" '((charset . (ascii latin-iso8859-2))
- (coding-system . (iso-8859-2))
+ "Slovenian" '((charset iso-8859-2)
+ (coding-system . (iso-8859-2 windows-1250))
(coding-priority . (iso-8859-2))
- (nonascii-translation . latin-iso8859-2)
+ (nonascii-translation . iso-8859-2)
(input-method . "slovenian")
- (unibyte-syntax . "latin-2")
(unibyte-display . iso-8859-2)
(tutorial . "TUTORIAL.sl")
- (sample-text . ",B.(Belimo vam uspe,B9(Ben dan!")
+ (sample-text . "$(D*v(Belimo vam uspe$(D+^(Ben dan!")
(documentation . "\
This language environment is almost the same as Latin-2,
but it selects the Slovenian tutorial and input method."))
@@ -341,14 +461,13 @@ but it selects the Slovenian tutorial and input method."))
(set-language-info-alist
"Spanish" '((tutorial . "TUTORIAL.es")
- (charset ascii latin-iso8859-1)
+ (charset iso-8859-1)
(coding-system iso-latin-1 iso-latin-9)
(coding-priority iso-latin-1)
(input-method . "spanish-postfix")
- (nonascii-translation . latin-iso8859-1)
- (unibyte-syntax . "latin-1")
+ (nonascii-translation . iso-8859-1)
(unibyte-display . iso-latin-1)
- (sample-text . "Spanish (Espa,Aq(Bol) ,A!(BHola!")
+ (sample-text . "Spanish (Espa$(D+P(Bol) $(D"B(BHola!")
(documentation . "\
This language environment is almost the same as Latin-1,
but it sets the default input method to \"spanish-postfix\",
@@ -361,52 +480,52 @@ and it selects the Spanish tutorial."))
;; "Latin-3" language environment.
(set-language-info-alist
- "Turkish" '((charset ascii latin-iso8859-9)
- (coding-system iso-latin-5 iso-latin-3)
+ "Turkish" '((charset iso-8859-9)
+ (coding-system iso-latin-5 windows-1254 iso-latin-3)
(coding-priority iso-latin-5)
- (nonascii-translation . latin-iso8859-9)
- (unibyte-syntax . "latin-5")
+ (nonascii-translation . iso-8859-9)
(unibyte-display . iso-latin-5)
(input-method . "turkish-postfix")
- (sample-text . "Turkish (T,M|(Brk,Mg(Be) Merhaba")
- (documentation . t)
+ (sample-text . "Turkish (T$(D+d(Brk$(D+.(Be) Merhaba")
(setup-function . turkish-case-conversion-enable)
- (exit-function . turkish-case-conversion-disable)))
+ (setup-function . turkish-case-conversion-disable)
+ (documentation . "Support for Turkish.
+Differs from the Latin-5 environment in using the `turkish-postfix' input
+method and applying Turkish case rules for the characters i, I, $(D)E(B, $(D*D(B.")))
(defun turkish-case-conversion-enable ()
- "Set up Turkish case conversion of `i' and `I' into `$,1 P(B' and `$,1 Q(B'."
+ "Set up Turkish case conversion of `i' and `I' into `$(D*D(B' and `$(D)E(B'."
(let ((table (standard-case-table)))
- (set-case-syntax-pair ?$,1 P(B ?i table)
- (set-case-syntax-pair ?I ?$,1 Q(B table)))
+ (set-case-syntax-pair ?$(D*D(B ?i table)
+ (set-case-syntax-pair ?I ?$(D)E(B table)))
(defun turkish-case-conversion-disable ()
"Set up normal (non-Turkish) case conversion of `i' into `I'."
(let ((table (standard-case-table)))
(set-case-syntax-pair ?I ?i table)
- (set-case-syntax ?$,1 P(B "w" table)
- (set-case-syntax ?$,1 Q(B "w" table)))
+ (set-case-syntax ?$(D*D(B "w" table)
+ (set-case-syntax ?$(D)E(B "w" table)))
;; Polish ISO 8859-2 environment.
;; Maintainer: Wlodek Bzyl <matwb@univ.gda.pl>
;; Keywords: multilingual, Polish
(set-language-info-alist
- "Polish" '((charset . (ascii latin-iso8859-2))
- (coding-system . (iso-8859-2))
- (coding-priority . (iso-8859-2))
+ "Polish" '((charset iso-8859-2)
+ (coding-system iso-8859-2 windows-1250)
+ (coding-priority iso-8859-2)
(input-method . "polish-slash")
- (nonascii-translation . latin-iso8859-2)
- (unibyte-syntax . "latin-2")
+ (nonascii-translation . iso-8859-2)
(unibyte-display . iso-8859-2)
(tutorial . "TUTORIAL.pl")
- (sample-text . "P,Bs(Bjd,B<(B, ki,Bq(B-,B?(Be t,Bj(B chmurno,B6f(B w g,B31(Bb flaszy")
+ (sample-text . "P$(D+Q(Bjd$(D+u(B, ki$(D+M(B-$(D+w(Be t$(D+8(B chmurno$(D+\++(B w g$(D)H+((Bb flaszy")
(documentation . t))
'("European"))
(set-language-info-alist
"Welsh" `((coding-system utf-8 latin-8) ; the input method is Unicode-based
(coding-priority utf-8 latin-8)
- (nonascii-translation . latin-iso8859-14)
+ (nonascii-translation . iso-8859-14)
(input-method . "welsh")
(documentation . "Support for Welsh, using Unicode."))
'("European"))
@@ -423,257 +542,130 @@ and it selects the Spanish tutorial."))
(set-language-info-alist
"Latin-7" `((coding-system latin-7)
(coding-priority latin-7)
- (nonascii-translation . ,(get 'decode-iso-latin-7
- 'translation-table))
+ (nonascii-translation . iso-8859-13)
(input-method . "latin-prefix")
- (features code-pages)
(documentation . "Support for Latin-7, e.g. Latvian, Lithuanian."))
'("European"))
(set-language-info-alist
- "Lithuanian" `((coding-system latin-7)
+ "Lithuanian" `((coding-system latin-7 windows-1257)
(coding-priority latin-7)
+ (nonascii-translation . iso-8859-13)
(input-method . "lithuanian-keyboard")
- (nonascii-translation . ,(get 'decode-iso-latin-7
- 'translation-table))
- (features code-pages)
(documentation . "Support for Lithuanian."))
'("European"))
(set-language-info-alist
- "Latvian" `((coding-system latin-7)
+ "Latvian" `((coding-system latin-7 windows-1257)
(coding-priority latin-7)
+ (nonascii-translation . iso-8859-13)
(input-method . "latvian-keyboard")
- (nonascii-translation . ,(get 'decode-iso-latin-7
- 'translation-table))
- (features code-pages)
(documentation . "Support for Latvian."))
'("European"))
(set-language-info-alist
"Swedish" '((tutorial . "TUTORIAL.sv")
- (charset ascii latin-iso8859-1)
+ (charset iso-8859-1)
(coding-system iso-latin-1)
(coding-priority iso-latin-1)
- (nonascii-translation . latin-iso8859-1)
- (unibyte-syntax . "latin-1")
+ (nonascii-translation . iso-8859-1)
(unibyte-display . iso-latin-1)
(sample-text . "Goddag Hej")
(documentation . "Support for Swedish"))
'("European"))
(set-language-info-alist
- "Croatian" '((charset . (ascii latin-iso8859-2))
- (coding-system . (iso-8859-2))
- (coding-priority . (iso-8859-2))
+ "Croatian" '((charset iso-8859-2)
+ (coding-system iso-8859-2)
+ (coding-priority iso-8859-2)
(input-method . "croatian")
- (nonascii-translation . latin-iso8859-2)
- (unibyte-syntax . "latin-2")
+ (nonascii-translation . iso-8859-2)
(unibyte-display . iso-8859-2)
(documentation . "Support for Croatian with Latin-2 encoding."))
'("European"))
(set-language-info-alist
"Brazilian Portuguese" '((tutorial . "TUTORIAL.pt_BR")
- (charset ascii latin-iso8859-1)
+ (charset iso-8859-1)
(coding-system iso-latin-1 iso-latin-9)
(coding-priority iso-latin-1)
- (nonascii-translation . latin-iso8859-1)
- (unibyte-syntax . "latin-1")
- (unibyte-display . iso-latin-1)
+ (nonascii-translation . iso-8859-1)
+ (unibyte-display . iso-8859-1)
(input-method . "latin-1-prefix")
(sample-text . "Oi")
(documentation . "Support for Brazilian Portuguese."))
'("European"))
+
-;; Definitions for the Mac Roman character sets and coding system.
-;; The Mac Roman encoding uses all 128 code points in the range 128 to
-;; 255 for actual characters. Emacs decodes them to one of the
-;; following character sets.
-;; ascii, latin-iso8859-1, mule-unicode-0100-24ff,
-;; mule-unicode-2500-33ff, mule-unicode-e000-ffff
-
-(let
- ((encoding-vector (make-vector 256 nil))
- (i 0)
- (vec ;; mac-roman (128..255) -> UCS mapping
- [ #x00C4 ;; 128:LATIN CAPITAL LETTER A WITH DIAERESIS
- #x00C5 ;; 129:LATIN CAPITAL LETTER A WITH RING ABOVE
- #x00C7 ;; 130:LATIN CAPITAL LETTER C WITH CEDILLA
- #x00C9 ;; 131:LATIN CAPITAL LETTER E WITH ACUTE
- #x00D1 ;; 132:LATIN CAPITAL LETTER N WITH TILDE
- #x00D6 ;; 133:LATIN CAPITAL LETTER O WITH DIAERESIS
- #x00DC ;; 134:LATIN CAPITAL LETTER U WITH DIAERESIS
- #x00E1 ;; 135:LATIN SMALL LETTER A WITH ACUTE
- #x00E0 ;; 136:LATIN SMALL LETTER A WITH GRAVE
- #x00E2 ;; 137:LATIN SMALL LETTER A WITH CIRCUMFLEX
- #x00E4 ;; 138:LATIN SMALL LETTER A WITH DIAERESIS
- #x00E3 ;; 139:LATIN SMALL LETTER A WITH TILDE
- #x00E5 ;; 140:LATIN SMALL LETTER A WITH RING ABOVE
- #x00E7 ;; 141:LATIN SMALL LETTER C WITH CEDILLA
- #x00E9 ;; 142:LATIN SMALL LETTER E WITH ACUTE
- #x00E8 ;; 143:LATIN SMALL LETTER E WITH GRAVE
- #x00EA ;; 144:LATIN SMALL LETTER E WITH CIRCUMFLEX
- #x00EB ;; 145:LATIN SMALL LETTER E WITH DIAERESIS
- #x00ED ;; 146:LATIN SMALL LETTER I WITH ACUTE
- #x00EC ;; 147:LATIN SMALL LETTER I WITH GRAVE
- #x00EE ;; 148:LATIN SMALL LETTER I WITH CIRCUMFLEX
- #x00EF ;; 149:LATIN SMALL LETTER I WITH DIAERESIS
- #x00F1 ;; 150:LATIN SMALL LETTER N WITH TILDE
- #x00F3 ;; 151:LATIN SMALL LETTER O WITH ACUTE
- #x00F2 ;; 152:LATIN SMALL LETTER O WITH GRAVE
- #x00F4 ;; 153:LATIN SMALL LETTER O WITH CIRCUMFLEX
- #x00F6 ;; 154:LATIN SMALL LETTER O WITH DIAERESIS
- #x00F5 ;; 155:LATIN SMALL LETTER O WITH TILDE
- #x00FA ;; 156:LATIN SMALL LETTER U WITH ACUTE
- #x00F9 ;; 157:LATIN SMALL LETTER U WITH GRAVE
- #x00FB ;; 158:LATIN SMALL LETTER U WITH CIRCUMFLEX
- #x00FC ;; 159:LATIN SMALL LETTER U WITH DIAERESIS
- #x2020 ;; 160:DAGGER
- #x00B0 ;; 161:DEGREE SIGN
- #x00A2 ;; 162:CENT SIGN
- #x00A3 ;; 163:POUND SIGN
- #x00A7 ;; 164:SECTION SIGN
- #x2022 ;; 165:BULLET
- #x00B6 ;; 166:PILCROW SIGN
- #x00DF ;; 167:LATIN SMALL LETTER SHARP S
- #x00AE ;; 168:REGISTERED SIGN
- #x00A9 ;; 169:COPYRIGHT SIGN
- #x2122 ;; 170:TRADE MARK SIGN
- #x00B4 ;; 171:ACUTE ACCENT
- #x00A8 ;; 172:DIAERESIS
- #x2260 ;; 173:NOT EQUAL TO
- #x00C6 ;; 174:LATIN CAPITAL LETTER AE
- #x00D8 ;; 175:LATIN CAPITAL LETTER O WITH STROKE
- #x221E ;; 176:INFINITY
- #x00B1 ;; 177:PLUS-MINUS SIGN
- #x2264 ;; 178:LESS-THAN OR EQUAL TO
- #x2265 ;; 179:GREATER-THAN OR EQUAL TO
- #x00A5 ;; 180:YEN SIGN
- #x00B5 ;; 181:MICRO SIGN
- #x2202 ;; 182:PARTIAL DIFFERENTIAL
- #x2211 ;; 183:N-ARY SUMMATION
- #x220F ;; 184:N-ARY PRODUCT
- #x03C0 ;; 185:GREEK SMALL LETTER PI
- #x222B ;; 186:INTEGRAL
- #x00AA ;; 187:FEMININE ORDINAL INDICATOR
- #x00BA ;; 188:MASCULINE ORDINAL INDICATOR
- #x03A9 ;; 189:GREEK CAPITAL LETTER OMEGA
- #x00E6 ;; 190:LATIN SMALL LETTER AE
- #x00F8 ;; 191:LATIN SMALL LETTER O WITH STROKE
- #x00BF ;; 192:INVERTED QUESTION MARK
- #x00A1 ;; 193:INVERTED EXCLAMATION MARK
- #x00AC ;; 194:NOT SIGN
- #x221A ;; 195:SQUARE ROOT
- #x0192 ;; 196:LATIN SMALL LETTER F WITH HOOK
- #x2248 ;; 197:ALMOST EQUAL TO
- #x2206 ;; 198:INCREMENT
- #x00AB ;; 199:LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
- #x00BB ;; 200:RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
- #x2026 ;; 201:HORIZONTAL ELLIPSIS
- #x00A0 ;; 202:NO-BREAK SPACE
- #x00C0 ;; 203:LATIN CAPITAL LETTER A WITH GRAVE
- #x00C3 ;; 204:LATIN CAPITAL LETTER A WITH TILDE
- #x00D5 ;; 205:LATIN CAPITAL LETTER O WITH TILDE
- #x0152 ;; 206:LATIN CAPITAL LIGATURE OE
- #x0153 ;; 207:LATIN SMALL LIGATURE OE
- #x2013 ;; 208:EN DASH
- #x2014 ;; 209:EM DASH
- #x201C ;; 210:LEFT DOUBLE QUOTATION MARK
- #x201D ;; 211:RIGHT DOUBLE QUOTATION MARK
- #x2018 ;; 212:LEFT SINGLE QUOTATION MARK
- #x2019 ;; 213:RIGHT SINGLE QUOTATION MARK
- #x00F7 ;; 214:DIVISION SIGN
- #x25CA ;; 215:LOZENGE
- #x00FF ;; 216:LATIN SMALL LETTER Y WITH DIAERESIS
- #x0178 ;; 217:LATIN CAPITAL LETTER Y WITH DIAERESIS
- #x2044 ;; 218:FRACTION SLASH
- #x20AC ;; 219:EURO SIGN
- #x2039 ;; 220:SINGLE LEFT-POINTING ANGLE QUOTATION MARK
- #x203A ;; 221:SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
- #xFB01 ;; 222:LATIN SMALL LIGATURE FI
- #xFB02 ;; 223:LATIN SMALL LIGATURE FL
- #x2021 ;; 224:DOUBLE DAGGER
- #x00B7 ;; 225:MIDDLE DOT
- #x201A ;; 226:SINGLE LOW-9 QUOTATION MARK
- #x201E ;; 227:DOUBLE LOW-9 QUOTATION MARK
- #x2030 ;; 228:PER MILLE SIGN
- #x00C2 ;; 229:LATIN CAPITAL LETTER A WITH CIRCUMFLEX
- #x00CA ;; 230:LATIN CAPITAL LETTER E WITH CIRCUMFLEX
- #x00C1 ;; 231:LATIN CAPITAL LETTER A WITH ACUTE
- #x00CB ;; 232:LATIN CAPITAL LETTER E WITH DIAERESIS
- #x00C8 ;; 233:LATIN CAPITAL LETTER E WITH GRAVE
- #x00CD ;; 234:LATIN CAPITAL LETTER I WITH ACUTE
- #x00CE ;; 235:LATIN CAPITAL LETTER I WITH CIRCUMFLEX
- #x00CF ;; 236:LATIN CAPITAL LETTER I WITH DIAERESIS
- #x00CC ;; 237:LATIN CAPITAL LETTER I WITH GRAVE
- #x00D3 ;; 238:LATIN CAPITAL LETTER O WITH ACUTE
- #x00D4 ;; 239:LATIN CAPITAL LETTER O WITH CIRCUMFLEX
- #xF8FF ;; 240:Apple logo
- #x00D2 ;; 241:LATIN CAPITAL LETTER O WITH GRAVE
- #x00DA ;; 242:LATIN CAPITAL LETTER U WITH ACUTE
- #x00DB ;; 243:LATIN CAPITAL LETTER U WITH CIRCUMFLEX
- #x00D9 ;; 244:LATIN CAPITAL LETTER U WITH GRAVE
- #x0131 ;; 245:LATIN SMALL LETTER DOTLESS I
- #x02C6 ;; 246:MODIFIER LETTER CIRCUMFLEX ACCENT
- #x02DC ;; 247:SMALL TILDE
- #x00AF ;; 248:MACRON
- #x02D8 ;; 249:BREVE
- #x02D9 ;; 250:DOT ABOVE
- #x02DA ;; 251:RING ABOVE
- #x00B8 ;; 252:CEDILLA
- #x02DD ;; 253:DOUBLE ACUTE ACCENT
- #x02DB ;; 254:OGONEK
- #x02C7 ;; 255:CARON
- ])
- translation-table)
- (while (< i 128)
- (aset encoding-vector i i)
- (setq i (1+ i)))
- (while (< i 256)
- (aset encoding-vector i
- (decode-char 'ucs (aref vec (- i 128))))
- (setq i (1+ i)))
- (setq translation-table
- (make-translation-table-from-vector encoding-vector))
- (define-translation-table 'mac-roman-decoder translation-table)
- (define-translation-table 'mac-roman-encoder
- (char-table-extra-slot translation-table 0)))
-
-(define-ccl-program decode-mac-roman
- `(4
- ((loop
- (read r1)
- (if (r1 < 128) ;; ASCII
- (r0 = ,(charset-id 'ascii))
- (if (r1 < 160)
- (r0 = ,(charset-id 'eight-bit-control))
- (r0 = ,(charset-id 'eight-bit-graphic))))
- (translate-character mac-roman-decoder r0 r1)
- (write-multibyte-character r0 r1)
- (repeat))))
- "CCL program to decode Mac Roman")
-
-(define-ccl-program encode-mac-roman
- `(1
- ((loop
- (read-multibyte-character r0 r1)
- (translate-character ucs-mule-to-mule-unicode r0 r1)
- (translate-character mac-roman-encoder r0 r1)
- (if (r0 != ,(charset-id 'ascii))
- (if (r0 != ,(charset-id 'eight-bit-graphic))
- (if (r0 != ,(charset-id 'eight-bit-control))
- (r1 = ??))))
- (write-repeat r1))))
- "CCL program to encode Mac Roman")
-
-(make-coding-system
- 'mac-roman 4 ?M
- "Mac Roman Encoding (MIME:MACINTOSH)."
- '(decode-mac-roman . encode-mac-roman)
- (list (cons 'safe-chars (get 'mac-roman-encoder 'translation-table))
- '(valid-codes (0 . 255))
- '(mime-charset . macintosh))) ; per IANA, rfc1345
+(define-coding-system 'mac-roman
+ "Mac Roman Encoding (MIME:MACINTOSH)."
+ :coding-type 'charset
+ :mnemonic ?M
+ :charset-list '(mac-roman)
+ :mime-charset 'macintosh)
+
+(define-coding-system 'next
+ "NeXTstep encoding"
+ :coding-type 'charset
+ :mnemonic ?*
+ :charset-list '(next)
+ :mime-charset 'next)
+
+(define-coding-system 'hp-roman8
+ "Hewlet-Packard roman-8 encoding (MIME:ROMAN-8)"
+ :coding-type 'charset
+ :mnemonic ?*
+ :charset-list '(hp-roman8)
+ :mime-charset 'hp-roman8)
+(define-coding-system-alias 'roman8 'hp-roman8)
+
+(define-coding-system 'adobe-standard-encoding
+ "Adobe `standard' encoding for PostScript"
+ :coding-type 'charset
+ :mnemonic ?*
+ :charset-list '(adobe-standard-encoding)
+ :mime-charset 'adobe-standard-encoding)
+
+
+;; For automatic composing of diacritics and combining marks.
+(dolist (range '( ;; combining diacritical marks
+ (#x0300 #x0314 (tc . bc))
+ (#x0315 (tr . bl))
+ (#x0316 #x0319 (bc . tc))
+ (#x031A (tr . cl))
+ (#x031B #x0320 (bc . tc))
+ (#x0321 (Br . tr))
+ (#x0322 (Br . tl))
+ (#x0323 #x0333 (bc . tc))
+ (#x0334 #x0338 (Bc . Bc))
+ (#x0339 #x033C (bc . tc))
+ (#x033D #x033F (tc . bc))
+ (#x0340 (tl . bc))
+ (#x0341 (tr . bc))
+ (#x0342 #x0344 (tc . bc))
+ (#x0345 (bc . tc))
+ (#x0346 (tc . bc))
+ (#x0347 #x0349 (bc . tc))
+ (#x034A #x034C (tc . bc))
+ (#x034D #x034E (bc . tc))
+ ;; combining diacritical marks for symbols
+ (#x20D0 #x20D1 (tc . bc))
+ (#x20D2 #x20D3 (Bc . Bc))
+ (#x20D4 #x20D7 (tc . bc))
+ (#x20D8 #x20DA (Bc . Bc))
+ (#x20DB #x20DC (tc . bc))
+ (#x20DD #x20E0 (Bc . Bc))
+ (#x20E1 (tc . bc))
+ (#x20E2 #x20E3 (Bc . Bc))))
+ (let* ((from (car range))
+ (to (if (= (length range) 3)
+ (nth 1 range)
+ from))
+ (composition (car (last range))))
+ (while (<= from to)
+ (put-char-code-property from 'diacritic-composition composition)
+ (aset composition-function-table from 'diacritic-composition-function)
+ (setq from (1+ from)))))
(defconst diacritic-composition-pattern "\\C^\\c^+")
@@ -686,13 +678,15 @@ positions (integers or markers) specifying the region."
(narrow-to-region beg end)
(goto-char (point-min))
(while (re-search-forward diacritic-composition-pattern nil t)
- (compose-region (match-beginning 0) (match-end 0)))))
+ (if (= (char-syntax (char-after (match-beginning 0))) ?w)
+ (compose-region (match-beginning 0) (match-end 0))))))
(defun diacritic-compose-string (string)
"Compose diacritic characters in STRING and return the resulting string."
(let ((idx 0))
(while (setq idx (string-match diacritic-composition-pattern string idx))
- (compose-string string idx (match-end 0))
+ (if (= (char-syntax (aref string idx)) ?w)
+ (compose-string string idx (match-end 0)))
(setq idx (match-end 0))))
string)
@@ -701,33 +695,50 @@ positions (integers or markers) specifying the region."
(interactive)
(diacritic-compose-region (point-min) (point-max)))
-(defun diacritic-post-read-conversion (len)
- (diacritic-compose-region (point) (+ (point) len))
- len)
-
-(defun diacritic-composition-function (from to pattern &optional string)
- "Compose diacritic text in the region FROM and TO.
-The text matches the regular expression PATTERN.
-Optional 4th argument STRING, if non-nil, is a string containing text
+(defun diacritic-composition-function (pos &optional string)
+ "Compose diacritic text around POS.
+Optional 2nd argument STRING, if non-nil, is a string containing text
to compose.
-The return value is the number of composed characters."
- (when (< (1+ from) to)
- (if string
- (compose-string string from to)
- (compose-region from to))
- (- to from)))
-
-;; Register a function to compose Unicode diacrtics and marks.
-(let ((patterns '(("\\C^\\c^+" . diacritic-composition-function))))
- (let ((c #x300))
- (while (<= c #x362)
- (aset composition-function-table (decode-char 'ucs c) patterns)
- (setq c (1+ c)))
- (setq c #x20d0)
- (while (<= c #x20e3)
- (aset composition-function-table (decode-char 'ucs c) patterns)
- (setq c (1+ c)))))
+The return value is the end position of composed characters,
+or nil if no characters are composed."
+ (setq pos (1- pos))
+ (if string
+ (if (>= pos 0)
+ (let ((ch (aref string pos))
+ start end components ch composition)
+ (when (= (char-syntax ch) ?w)
+ (setq start pos
+ end (length string)
+ components (list ch)
+ pos (1+ pos))
+ (while (and
+ (< pos end)
+ (setq ch (aref string pos)
+ composition
+ (get-char-code-property ch
+ 'diacritic-composition)))
+ (setq components (cons ch (cons composition components))
+ pos (1+ pos)))
+ (compose-string string start pos (nreverse components))
+ pos)))
+ (if (>= pos (point-min))
+ (let ((ch (char-after pos))
+ start end components composition)
+ (when (= (char-syntax ch) ?w)
+ (setq start pos
+ end (point-max)
+ components (list ch)
+ pos (1+ pos))
+ (while (and
+ (< pos end)
+ (setq ch (char-after pos)
+ composition
+ (get-char-code-property ch 'diacritic-composition)))
+ (setq components (cons ch (cons composition components))
+ pos (1+ pos)))
+ (compose-region start pos (nreverse components))
+ pos)))))
(provide 'european)
diff --git a/lisp/language/georgian.el b/lisp/language/georgian.el
index b2624b9555f..5546df81d7e 100644
--- a/lisp/language/georgian.el
+++ b/lisp/language/georgian.el
@@ -27,13 +27,23 @@
;;; Code:
+(define-coding-system 'georgian-ps
+ "Georgian PS encoding"
+ :coding-type 'charset
+ :mnemonic ?G
+ :charset-list '(georgian-ps))
+
+(define-coding-system 'georgian-academy
+ "Georgian Academy encoding"
+ :coding-type 'charset
+ :mnemonic ?G
+ :charset-list '(georgian-academy))
+
(set-language-info-alist
"Georgian" `((coding-system georgian-ps)
(coding-priority georgian-ps)
(input-method . "georgian")
- (features code-pages)
- (nonascii-translation . ,(get 'decode-georgian-ps
- 'translation-table))
+ (nonascii-translation . georgian-ps)
(documentation . "Support for georgian-ps character set."))
'("European")) ; fixme: is this appropriate for
; a non-Latin script?
diff --git a/lisp/language/greek.el b/lisp/language/greek.el
index 9eb7b4f7352..aca46aa6b24 100644
--- a/lisp/language/greek.el
+++ b/lisp/language/greek.el
@@ -1,10 +1,15 @@
;;; greek.el --- support for Greek -*- no-byte-compile: t -*-
+;; Copyright (C) 2002 Free Software Foundation, Inc.
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
+;; Copyright (C) 2003
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H13PRO009
+
;; Keywords: multilingual, Greek
;; This file is part of GNU Emacs.
@@ -30,23 +35,52 @@
;;; Code:
-(make-coding-system
- 'greek-iso-8bit 2 ?7
- "ISO 2022 based 8-bit encoding for Greek (MIME:ISO-8859-7)."
- '(ascii greek-iso8859-7 nil nil
- nil nil nil nil nil nil nil nil nil nil nil t)
- '((safe-charsets ascii greek-iso8859-7)
- (mime-charset . iso-8859-7)))
+(define-coding-system 'greek-iso-8bit
+ "ISO 2022 based 8-bit encoding for Greek (MIME:ISO-8859-7)."
+ :coding-type 'charset
+ :mnemonic ?7
+ :charset-list '(iso-8859-7)
+ :mime-charset 'iso-8859-7)
(define-coding-system-alias 'iso-8859-7 'greek-iso-8bit)
+(define-coding-system 'windows-1253
+ "windows-1253 encoding for Greek"
+ :coding-type 'charset
+ :mnemonic ?g
+ :charset-list '(windows-1253)
+ :mime-charset 'windows-1253)
+(define-coding-system-alias 'cp1253 'windows-1253)
+
+(define-coding-system 'cp737
+ "Codepage 737 (PC Greek)"
+ :coding-type 'charset
+ :mnemonic ?D
+ :charset-list '(cp737)
+ :mime-charset 'cp737)
+
+(define-coding-system 'cp851
+ "DOS codepage 851 (Greek)"
+ :coding-type 'charset
+ :mnemonic ?D
+ :charset-list '(cp851)
+ :mime-charset 'cp851)
+(define-coding-system-alias 'ibm851 'cp851)
+
+(define-coding-system 'cp869
+ "DOS codepage 869 (Greek)"
+ :coding-type 'charset
+ :mnemonic ?D
+ :charset-list '(cp869)
+ :mime-charset 'cp869)
+(define-coding-system-alias 'ibm869 'cp869)
+
(set-language-info-alist
- "Greek" '((charset . (greek-iso8859-7))
- (coding-system . (greek-iso-8bit))
+ "Greek" '((charset iso-8859-7)
+ (coding-system greek-iso-8bit windows-1253 cp851 cp869)
(coding-priority greek-iso-8bit)
- (nonascii-translation . greek-iso8859-7)
+ (nonascii-translation . iso-8859-7)
(input-method . "greek")
- (unibyte-display . greek-iso-8bit)
(documentation . t)))
(provide 'greek)
diff --git a/lisp/language/hebrew.el b/lisp/language/hebrew.el
index abd2f6612bf..f9c9aa68b7b 100644
--- a/lisp/language/hebrew.el
+++ b/lisp/language/hebrew.el
@@ -7,6 +7,10 @@
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
+;; Copyright (C) 2003
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H13PRO009
+
;; Keywords: multilingual, Hebrew
;; This file is part of GNU Emacs.
@@ -34,13 +38,12 @@
;;; Code:
-(make-coding-system
- 'hebrew-iso-8bit 2 ?8
- "ISO 2022 based 8-bit encoding for Hebrew (MIME:ISO-8859-8)."
- '(ascii hebrew-iso8859-8 nil nil
- nil nil nil nil nil nil nil nil t nil nil t)
- '((safe-charsets ascii hebrew-iso8859-8)
- (mime-charset . iso-8859-8)))
+(define-coding-system 'hebrew-iso-8bit
+ "ISO 2022 based 8-bit encoding for Hebrew (MIME:ISO-8859-8)."
+ :coding-type 'charset
+ :mnemonic ?8
+ :charset-list '(iso-8859-8)
+ :mime-charset 'iso-8859-8)
(define-coding-system-alias 'iso-8859-8 'hebrew-iso-8bit)
@@ -52,10 +55,10 @@
(define-coding-system-alias 'iso-8859-8-i 'hebrew-iso-8bit)
(set-language-info-alist
- "Hebrew" '((charset . (hebrew-iso8859-8))
+ "Hebrew" '((charset iso-8859-8)
(coding-priority hebrew-iso-8bit)
- (coding-system . (hebrew-iso-8bit))
- (nonascii-translation . hebrew-iso8859-8)
+ (coding-system hebrew-iso-8bit windows-1255 cp862)
+ (nonascii-translation . iso-8859-8)
(input-method . "hebrew")
(unibyte-display . hebrew-iso-8bit)
(sample-text . "Hebrew ,Hylem(B")
@@ -64,11 +67,26 @@
(set-language-info-alist
"Windows-1255" '((coding-priority windows-1255)
(coding-system windows-1255)
- (features code-pages)
(documentation . "\
Support for Windows-1255 encoding, e.g. for Yiddish.
Right-to-left writing is not yet supported.")))
+(define-coding-system 'windows-1255
+ "windows-1255 (Hebrew) encoding (MIME: WINDOWS-1255)"
+ :coding-type 'charset
+ :mnemonic ?h
+ :charset-list '(windows-1255)
+ :mime-charset 'windows-1255)
+(define-coding-system-alias 'cp1255 'windows-1255)
+
+(define-coding-system 'cp862
+ "DOS codepage 862 (Hebrew)"
+ :coding-type 'charset
+ :mnemonic ?D
+ :charset-list '(cp862)
+ :mime-charset 'cp862)
+(define-coding-system-alias 'ibm862 'cp862)
+
(provide 'hebrew)
;;; arch-tag: 3ca04f32-3f1e-498e-af46-8267498ba5d9
diff --git a/lisp/language/ind-util.el b/lisp/language/ind-util.el
index 1a082ba04e9..2693a565f02 100644
--- a/lisp/language/ind-util.el
+++ b/lisp/language/ind-util.el
@@ -408,7 +408,7 @@ FUNCTION will be called 15 times."
;; trans-char -- nil / string / list of strings
(when (and char trans-char)
(if (stringp trans-char) (setq trans-char (list trans-char)))
- (if (char-valid-p char) (setq char (char-to-string char)))
+ (if (characterp char) (setq char (char-to-string char)))
(puthash char (car trans-char) encode-hash)
(dolist (trans trans-char)
(puthash trans char decode-hash)))))
@@ -426,7 +426,7 @@ FUNCTION will be called 15 times."
(defun indian--puthash-c (c trans-c halant hashtbls)
(indian--map
(lambda (c trans-c)
- (if (char-valid-p c) (setq c (char-to-string c)))
+ (if (characterp c) (setq c (char-to-string c)))
(indian--puthash-char (concat c halant) trans-c hashtbls))
c trans-c))
@@ -442,8 +442,8 @@ FUNCTION will be called 15 times."
(indian--map
(lambda (v trans-v)
(when (and c trans-c v trans-v)
- (if (char-valid-p c) (setq c (char-to-string c)))
- (setq v (if (char-valid-p (cadr v)) (char-to-string (cadr v)) ""))
+ (if (characterp c) (setq c (char-to-string c)))
+ (setq v (if (characterp (cadr v)) (char-to-string (cadr v)) ""))
(if (stringp trans-c) (setq trans-c (list trans-c)))
(if (stringp trans-v) (setq trans-v (list trans-v)))
(indian--puthash-char
@@ -577,152 +577,165 @@ FUNCTION will be called 15 times."
;; The followings provide conversion between IS 13194 (ISCII) and UCS.
-(defvar ucs-devanagari-to-is13194-alist
- '(;;Unicode vs IS13194 ;; only Devanagari is supported now.
- (?\x0900 . "[U+0900]")
- (?\x0901 . "(5!(B")
- (?\x0902 . "(5"(B")
- (?\x0903 . "(5#(B")
- (?\x0904 . "[U+0904]")
- (?\x0905 . "(5$(B")
- (?\x0906 . "(5%(B")
- (?\x0907 . "(5&(B")
- (?\x0908 . "(5'(B")
- (?\x0909 . "(5((B")
- (?\x090a . "(5)(B")
- (?\x090b . "(5*(B")
- (?\x090c . "(5&i(B")
- (?\x090d . "(5.(B")
- (?\x090e . "(5+(B")
- (?\x090f . "(5,(B")
- (?\x0910 . "(5-(B")
- (?\x0911 . "(52(B")
- (?\x0912 . "(5/(B")
- (?\x0913 . "(50(B")
- (?\x0914 . "(51(B")
- (?\x0915 . "(53(B")
- (?\x0916 . "(54(B")
- (?\x0917 . "(55(B")
- (?\x0918 . "(56(B")
- (?\x0919 . "(57(B")
- (?\x091a . "(58(B")
- (?\x091b . "(59(B")
- (?\x091c . "(5:(B")
- (?\x091d . "(5;(B")
- (?\x091e . "(5<(B")
- (?\x091f . "(5=(B")
- (?\x0920 . "(5>(B")
- (?\x0921 . "(5?(B")
- (?\x0922 . "(5@(B")
- (?\x0923 . "(5A(B")
- (?\x0924 . "(5B(B")
- (?\x0925 . "(5C(B")
- (?\x0926 . "(5D(B")
- (?\x0927 . "(5E(B")
- (?\x0928 . "(5F(B")
- (?\x0929 . "(5G(B")
- (?\x092a . "(5H(B")
- (?\x092b . "(5I(B")
- (?\x092c . "(5J(B")
- (?\x092d . "(5K(B")
- (?\x092e . "(5L(B")
- (?\x092f . "(5M(B")
- (?\x0930 . "(5O(B")
- (?\x0931 . "(5P(B")
- (?\x0932 . "(5Q(B")
- (?\x0933 . "(5R(B")
- (?\x0934 . "(5S(B")
- (?\x0935 . "(5T(B")
- (?\x0936 . "(5U(B")
- (?\x0937 . "(5V(B")
- (?\x0938 . "(5W(B")
- (?\x0939 . "(5X(B")
- (?\x093a . "[U+093a]")
- (?\x093b . "[U+093b]")
- (?\x093c . "(5i(B")
- (?\x093d . "(5ji(B")
- (?\x093e . "(5Z(B")
- (?\x093f . "(5[(B")
- (?\x0940 . "(5\(B")
- (?\x0941 . "(5](B")
- (?\x0942 . "(5^(B")
- (?\x0943 . "(5_(B")
- (?\x0944 . "(5_i(B")
- (?\x0945 . "(5c(B")
- (?\x0946 . "(5`(B")
- (?\x0947 . "(5a(B")
- (?\x0948 . "(5b(B")
- (?\x0949 . "(5g(B")
- (?\x094a . "(5d(B")
- (?\x094b . "(5e(B")
- (?\x094c . "(5f(B")
- (?\x094d . "(5h(B")
- (?\x094e . "[U+094e]")
- (?\x094f . "[U+094f]")
- (?\x0950 . "(5!i(B")
- (?\x0951 . "(5p5(B")
- (?\x0952 . "(5p8(B")
- (?\x0953 . "[DEVANAGARI GRAVE ACCENT]")
- (?\x0954 . "[DEVANAGARI ACUTE ACCENT]")
- (?\x0955 . "[U+0955]")
- (?\x0956 . "[U+0956]")
- (?\x0957 . "[U+0957]")
- (?\x0958 . "(53i(B")
- (?\x0959 . "(54i(B")
- (?\x095a . "(55i(B")
- (?\x095b . "(5:i(B")
- (?\x095c . "(5?i(B")
- (?\x095d . "(5@i(B")
- (?\x095e . "(5Ii(B")
- (?\x095f . "(5N(B")
- (?\x0960 . "(5*i(B")
- (?\x0961 . "(5'i(B")
- (?\x0962 . "(5[i(B")
- (?\x0963 . "(5ei(B")
- (?\x0964 . "(5j(B")
- (?\x0965 . "(5jj(B")
- (?\x0966 . "(5q(B")
- (?\x0967 . "(5r(B")
- (?\x0968 . "(5s(B")
- (?\x0969 . "(5t(B")
- (?\x096a . "(5u(B")
- (?\x096b . "(5v(B")
- (?\x096c . "(5w(B")
- (?\x096d . "(5x(B")
- (?\x096e . "(5y(B")
- (?\x096f . "(5z(B")
- (?\x0970 . "[U+0970]")
- (?\x0971 . "[U+0971]")
- (?\x0972 . "[U+0972]")
- (?\x0973 . "[U+0973]")
- (?\x0974 . "[U+0974]")
- (?\x0975 . "[U+0975]")
- (?\x0976 . "[U+0976]")
- (?\x0977 . "[U+0977]")
- (?\x0978 . "[U+0978]")
- (?\x0979 . "[U+0979]")
- (?\x097a . "[U+097a]")
- (?\x097b . "[U+097b]")
- (?\x097c . "[U+097c]")
- (?\x097d . "[U+097d]")
- (?\x097e . "[U+097e]")
- (?\x097f . "[U+097f]")))
-
-(defvar ucs-bengali-to-is13194-alist nil)
-(defvar ucs-assamese-to-is13194-alist nil)
-(defvar ucs-gurmukhi-to-is13194-alist nil)
-(defvar ucs-gujarati-to-is13194-alist nil)
-(defvar ucs-oriya-to-is13194-alist nil)
-(defvar ucs-tamil-to-is13194-alist nil)
-(defvar ucs-telugu-to-is13194-alist nil)
-(defvar ucs-malayalam-to-is13194-alist nil)
-(defvar ucs-kannada-to-is13194-alist nil)
-
-(defvar is13194-default-repartory 'devanagari)
+(let
+ ;;Unicode vs IS13194 ;; only Devanagari is supported now.
+ ((ucs-devanagari-to-is13194-alist
+ '((?\x0900 . "[U+0900]")
+ (?\x0901 . "(5!(B")
+ (?\x0902 . "(5"(B")
+ (?\x0903 . "(5#(B")
+ (?\x0904 . "[U+0904]")
+ (?\x0905 . "(5$(B")
+ (?\x0906 . "(5%(B")
+ (?\x0907 . "(5&(B")
+ (?\x0908 . "(5'(B")
+ (?\x0909 . "(5((B")
+ (?\x090a . "(5)(B")
+ (?\x090b . "(5*(B")
+ (?\x090c . "(5&i(B")
+ (?\x090d . "(5.(B")
+ (?\x090e . "(5+(B")
+ (?\x090f . "(5,(B")
+ (?\x0910 . "(5-(B")
+ (?\x0911 . "(52(B")
+ (?\x0912 . "(5/(B")
+ (?\x0913 . "(50(B")
+ (?\x0914 . "(51(B")
+ (?\x0915 . "(53(B")
+ (?\x0916 . "(54(B")
+ (?\x0917 . "(55(B")
+ (?\x0918 . "(56(B")
+ (?\x0919 . "(57(B")
+ (?\x091a . "(58(B")
+ (?\x091b . "(59(B")
+ (?\x091c . "(5:(B")
+ (?\x091d . "(5;(B")
+ (?\x091e . "(5<(B")
+ (?\x091f . "(5=(B")
+ (?\x0920 . "(5>(B")
+ (?\x0921 . "(5?(B")
+ (?\x0922 . "(5@(B")
+ (?\x0923 . "(5A(B")
+ (?\x0924 . "(5B(B")
+ (?\x0925 . "(5C(B")
+ (?\x0926 . "(5D(B")
+ (?\x0927 . "(5E(B")
+ (?\x0928 . "(5F(B")
+ (?\x0929 . "(5G(B")
+ (?\x092a . "(5H(B")
+ (?\x092b . "(5I(B")
+ (?\x092c . "(5J(B")
+ (?\x092d . "(5K(B")
+ (?\x092e . "(5L(B")
+ (?\x092f . "(5M(B")
+ (?\x0930 . "(5O(B")
+ (?\x0931 . "(5P(B")
+ (?\x0932 . "(5Q(B")
+ (?\x0933 . "(5R(B")
+ (?\x0934 . "(5S(B")
+ (?\x0935 . "(5T(B")
+ (?\x0936 . "(5U(B")
+ (?\x0937 . "(5V(B")
+ (?\x0938 . "(5W(B")
+ (?\x0939 . "(5X(B")
+ (?\x093a . "[U+093a]")
+ (?\x093b . "[U+093b]")
+ (?\x093c . "(5i(B")
+ (?\x093d . "(5ji(B")
+ (?\x093e . "(5Z(B")
+ (?\x093f . "(5[(B")
+ (?\x0940 . "(5\(B")
+ (?\x0941 . "(5](B")
+ (?\x0942 . "(5^(B")
+ (?\x0943 . "(5_(B")
+ (?\x0944 . "(5_i(B")
+ (?\x0945 . "(5c(B")
+ (?\x0946 . "(5`(B")
+ (?\x0947 . "(5a(B")
+ (?\x0948 . "(5b(B")
+ (?\x0949 . "(5g(B")
+ (?\x094a . "(5d(B")
+ (?\x094b . "(5e(B")
+ (?\x094c . "(5f(B")
+ (?\x094d . "(5h(B")
+ (?\x094e . "[U+094e]")
+ (?\x094f . "[U+094f]")
+ (?\x0950 . "(5!i(B")
+ (?\x0951 . "(5p5(B")
+ (?\x0952 . "(5p8(B")
+ (?\x0953 . "[DEVANAGARI GRAVE ACCENT]")
+ (?\x0954 . "[DEVANAGARI ACUTE ACCENT]")
+ (?\x0955 . "[U+0955]")
+ (?\x0956 . "[U+0956]")
+ (?\x0957 . "[U+0957]")
+ (?\x0958 . "(53i(B")
+ (?\x0959 . "(54i(B")
+ (?\x095a . "(55i(B")
+ (?\x095b . "(5:i(B")
+ (?\x095c . "(5?i(B")
+ (?\x095d . "(5@i(B")
+ (?\x095e . "(5Ii(B")
+ (?\x095f . "(5N(B")
+ (?\x0960 . "(5*i(B")
+ (?\x0961 . "(5'i(B")
+ (?\x0962 . "(5[i(B")
+ (?\x0963 . "(5ei(B")
+ (?\x0964 . "(5j(B")
+ (?\x0965 . "(5jj(B")
+ (?\x0966 . "(5q(B")
+ (?\x0967 . "(5r(B")
+ (?\x0968 . "(5s(B")
+ (?\x0969 . "(5t(B")
+ (?\x096a . "(5u(B")
+ (?\x096b . "(5v(B")
+ (?\x096c . "(5w(B")
+ (?\x096d . "(5x(B")
+ (?\x096e . "(5y(B")
+ (?\x096f . "(5z(B")
+ (?\x0970 . "[U+0970]")
+ (?\x0971 . "[U+0971]")
+ (?\x0972 . "[U+0972]")
+ (?\x0973 . "[U+0973]")
+ (?\x0974 . "[U+0974]")
+ (?\x0975 . "[U+0975]")
+ (?\x0976 . "[U+0976]")
+ (?\x0977 . "[U+0977]")
+ (?\x0978 . "[U+0978]")
+ (?\x0979 . "[U+0979]")
+ (?\x097a . "[U+097a]")
+ (?\x097b . "[U+097b]")
+ (?\x097c . "[U+097c]")
+ (?\x097d . "[U+097d]")
+ (?\x097e . "[U+097e]")
+ (?\x097f . "[U+097f]")))
+ (ucs-bengali-to-is13194-alist nil)
+ (ucs-assamese-to-is13194-alist nil)
+ (ucs-gurmukhi-to-is13194-alist nil)
+ (ucs-gujarati-to-is13194-alist nil)
+ (ucs-oriya-to-is13194-alist nil)
+ (ucs-tamil-to-is13194-alist nil)
+ (ucs-telugu-to-is13194-alist nil)
+ (ucs-malayalam-to-is13194-alist nil)
+ (ucs-kannada-to-is13194-alist nil))
+ (dolist (script '(devanagari bengali assamese gurmukhi gujarati
+ oriya tamil telugu malayalam kannada))
+ (let ((hashtable (intern (concat "is13194-to-ucs-"
+ (symbol-name script) "-hashtbl" )))
+ (regexp (intern (concat "is13194-to-ucs-"
+ (symbol-name script) "-regexp"))))
+ (set hashtable (make-hash-table :test 'equal :size 128))
+ (dolist (x (eval (intern (concat "ucs-" (symbol-name script)
+ "-to-is13194-alist"))))
+ (put-char-code-property (car x) 'script script)
+ (put-char-code-property (car x) 'iscii (cdr x))
+ (puthash (cdr x) (char-to-string (car x)) (eval hashtable)))
+ (set regexp (indian-regexp-of-hashtbl-keys (eval hashtable))))))
+
+(defvar is13194-default-repertory 'devanagari)
(defvar is13194-repertory-to-ucs-script
- `((DEF ?\x40 ,is13194-default-repartory)
- (RMN ?\x41 ,is13194-default-repartory)
+ `((DEF ?\x40 ,is13194-default-repertory)
+ (RMN ?\x41 ,is13194-default-repertory)
(DEV ?\x42 devanagari)
(BNG ?\x43 bengali)
(TML ?\x44 tamil)
@@ -756,31 +769,10 @@ FUNCTION will be called 15 times."
(defvar is13194-to-ucs-kannada-hashtbl nil)
(defvar is13194-to-ucs-kannada-regexp nil)
-(mapc
- (function (lambda (script)
- (let ((hashtable (intern (concat "is13194-to-ucs-"
- (symbol-name script) "-hashtbl" )))
- (regexp (intern (concat "is13194-to-ucs-"
- (symbol-name script) "-regexp"))))
- (set hashtable (make-hash-table :test 'equal :size 128))
- (mapc
- (function (lambda (x)
- (put-char-code-property (decode-char 'ucs (car x))
- 'script script)
- (put-char-code-property (decode-char 'ucs (car x))
- 'iscii (cdr x))
- (puthash (cdr x) (char-to-string (decode-char 'ucs (car x)))
- (eval hashtable))))
- (eval (intern (concat "ucs-" (symbol-name script)
- "-to-is13194-alist"))))
- (set regexp (indian-regexp-of-hashtbl-keys (eval hashtable))))))
- '(devanagari bengali assamese gurmukhi gujarati
- oriya tamil telugu malayalam kannada))
-
(defvar ucs-to-is13194-regexp
;; only Devanagari is supported now.
- (concat "[" (char-to-string (decode-char 'ucs #x0900))
- "-" (char-to-string (decode-char 'ucs #x097f)) "]")
+ (concat "[" (char-to-string #x0900)
+ "-" (char-to-string #x097f) "]")
"Regexp that matches to conversion")
(defun ucs-to-iscii-region (from to)
@@ -792,11 +784,11 @@ Returns new end position."
(save-restriction
(narrow-to-region from to)
(goto-char (point-min))
- (let* ((current-repertory is13194-default-repartory))
- (while (re-search-forward ucs-to-is13194-regexp nil t)
- (replace-match
- (get-char-code-property (string-to-char (match-string 0))
- 'iscii))))
+ (let* ((current-repertory is13194-default-repertory))
+ (while (re-search-forward ucs-to-is13194-regexp nil t)
+ (replace-match
+ (get-char-code-property (string-to-char (match-string 0))
+ 'iscii))))
(point-max))))
(defun iscii-to-ucs-region (from to)
@@ -808,16 +800,17 @@ Returns new end position."
(save-restriction
(narrow-to-region from to)
(goto-char (point-min))
- (let* ((current-repertory is13194-default-repartory)
- (current-hashtable
- (intern (concat "is13194-to-ucs-"
- (symbol-name current-repertory) "-hashtbl")))
- (current-regexp
- (intern (concat "is13194-to-ucs-"
- (symbol-name current-repertory) "-regexp"))))
- (while (re-search-forward (eval current-regexp) nil t)
- (replace-match
- (gethash (match-string 0) (eval current-hashtable) ""))))
+ (let* ((current-repertory is13194-default-repertory)
+ (current-hashtable
+ (intern (concat "is13194-to-ucs-"
+ (symbol-name current-repertory) "-hashtbl")))
+ (current-regexp
+ (intern (concat "is13194-to-ucs-"
+ (symbol-name current-repertory) "-regexp")))
+ (re (eval current-regexp))
+ (hash (eval current-hashtable)))
+ (while (re-search-forward re nil t)
+ (replace-match (gethash (match-string 0) hash ""))))
(point-max))))
;;;###autoload
@@ -826,11 +819,15 @@ Returns new end position."
(interactive "r")
(save-excursion
(save-restriction
- (let ((pos from) chars (max to))
- (narrow-to-region from to)
- (while (< pos max)
- (setq chars (compose-chars-after pos))
- (if chars (setq pos (+ pos chars)) (setq pos (1+ pos))))))))
+ (let ((pos from) newpos func (max to))
+ (narrow-to-region from to)
+ (while (< pos max)
+ (setq func (aref composition-function-table (char-after pos)))
+ (if (fboundp func)
+ (setq newpos (funcall func pos nil)
+ pos (if (and (integerp newpos) (> newpos pos))
+ newpos (1+ pos)))
+ (setq pos (1+ pos))))))))
;;;###autoload
(defun indian-compose-string (string)
@@ -861,405 +858,370 @@ Returns new end position."
;;; Backward Compatibility support programs
-;; The followings provides the conversion from old-implementation of
+;; The following provides the conversion from old-implementation of
;; Emacs Devanagari script to UCS.
(defconst indian-2-colum-to-ucs
'(
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2120 $(5!!!"!#!$!%!&!'!(!)!*!+!,!-!.!/(B
- ("$(5!!(B" . "$,15A(B")
- ("$(5!"(B" . "$,15B(B")
- ("$(5!#(B" . "$,15C(B")
- ("$(5!$(B" . "$,15E(B")
- ("$(5!%(B" . "$,15F(B")
- ("$(5!&(B" . "$,15G(B")
- ("$(5!'(B" . "$,15H(B")
- ("$(5!((B" . "$,15I(B")
- ("$(5!)(B" . "$,15J(B")
- ("$(5!*(B" . "$,15K(B")
- ("$(5!*"p(B" . "$,15p6#(B")
- ("$(5!+(B" . "$,15N(B")
- ("$(5!,(B" . "$,15O(B")
- ("$(5!-(B" . "$,15P(B")
- ("$(5!.(B" . "$,15M(B")
- ("$(5!/(B" . "$,15R(B")
+ ;;2120 $(6!!!"!#!$!%!&!'!(!)!*!+!,!-!.!/(B
+ ("$(6!!(B" . "$,15A(B")
+ ("$(6!"(B" . "$,15B(B")
+ ("$(6!#(B" . "$,15C(B")
+ ("$(6!$(B" . "$,15E(B")
+ ("$(6!%(B" . "$,15F(B")
+ ("$(6!&(B" . "$,15G(B")
+ ("$(6!'(B" . "$,15H(B")
+ ("$(6!((B" . "$,15I(B")
+ ("$(6!)(B" . "$,15J(B")
+ ("$(6!*(B" . "$,15K(B")
+ ("$(6!*"p(B" . "$,15p6#(B")
+ ("$(6!+(B" . "$,15N(B")
+ ("$(6!,(B" . "$,15O(B")
+ ("$(6!-(B" . "$,15P(B")
+ ("$(6!.(B" . "$,15M(B")
+ ("$(6!/(B" . "$,15R(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2130 $(5!0!1!2!3!4!5!6!7!8!9!:!;!<!=!>!?(B
- ("$(5!0(B" . "$,15S(B")
- ("$(5!1(B" . "$,15T(B")
- ("$(5!2(B" . "$,15Q(B")
- ("$(5!3(B" . "$,15U(B")
- ("$(5!4(B" . "$,15V(B")
- ("$(5!5(B" . "$,15W(B")
- ("$(5!6(B" . "$,15X(B")
- ("$(5!7(B" . "$,15Y(B")
- ("$(5!8(B" . "$,15Z(B")
- ("$(5!9(B" . "$,15[(B")
- ("$(5!:(B" . "$,15\(B")
- ("$(5!;(B" . "$,15](B")
- ("$(5!<(B" . "$,15^(B")
- ("$(5!=(B" . "$,15_(B")
- ("$(5!>(B" . "$,15`(B")
- ("$(5!?(B" . "$,15a(B")
+ ;;2130 $(6!0!1!2!3!4!5!6!7!8!9!:!;!<!=!>!?(B
+ ("$(6!0(B" . "$,15S(B")
+ ("$(6!1(B" . "$,15T(B")
+ ("$(6!2(B" . "$,15Q(B")
+ ("$(6!3(B" . "$,15U(B")
+ ("$(6!4(B" . "$,15V(B")
+ ("$(6!5(B" . "$,15W(B")
+ ("$(6!6(B" . "$,15X(B")
+ ("$(6!7(B" . "$,15Y(B")
+ ("$(6!8(B" . "$,15Z(B")
+ ("$(6!9(B" . "$,15[(B")
+ ("$(6!:(B" . "$,15\(B")
+ ("$(6!;(B" . "$,15](B")
+ ("$(6!<(B" . "$,15^(B")
+ ("$(6!=(B" . "$,15_(B")
+ ("$(6!>(B" . "$,15`(B")
+ ("$(6!?(B" . "$,15a(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2140 $(5!@!A!B!C!D!E!F!G!H!I!J!K!L!M!N!O(B
- ("$(5!@(B" . "$,15b(B")
- ("$(5!A(B" . "$,15c(B")
- ("$(5!B(B" . "$,15d(B")
- ("$(5!C(B" . "$,15e(B")
- ("$(5!D(B" . "$,15f(B")
- ("$(5!E(B" . "$,15g(B")
- ("$(5!F(B" . "$,15h(B")
- ("$(5!G(B" . "$,15i(B")
- ("$(5!H(B" . "$,15j(B")
- ("$(5!I(B" . "$,15k(B")
- ("$(5!J(B" . "$,15l(B")
- ("$(5!K(B" . "$,15m(B")
- ("$(5!L(B" . "$,15n(B")
- ("$(5!M(B" . "$,15o(B")
- ("$(5!N(B" . "$,16?(B")
- ("$(5!O(B" . "$,15p(B")
+ ;;2140 $(6!@!A!B!C!D!E!F!G!H!I!J!K!L!M!N!O(B
+ ("$(6!@(B" . "$,15b(B")
+ ("$(6!A(B" . "$,15c(B")
+ ("$(6!B(B" . "$,15d(B")
+ ("$(6!C(B" . "$,15e(B")
+ ("$(6!D(B" . "$,15f(B")
+ ("$(6!E(B" . "$,15g(B")
+ ("$(6!F(B" . "$,15h(B")
+ ("$(6!G(B" . "$,15i(B")
+ ("$(6!H(B" . "$,15j(B")
+ ("$(6!I(B" . "$,15k(B")
+ ("$(6!J(B" . "$,15l(B")
+ ("$(6!K(B" . "$,15m(B")
+ ("$(6!L(B" . "$,15n(B")
+ ("$(6!M(B" . "$,15o(B")
+ ("$(6!N(B" . "$,16?(B")
+ ("$(6!O(B" . "$,15p(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2150 $(5!P!Q!R!S!T!U!V!W!X!Y!Z![!\!]!^!_(B
- ("$(5!P(B" . "$,15q(B")
- ("$(5!Q(B" . "$,15r(B")
- ("$(5!R(B" . "$,15s(B")
- ("$(5!S(B" . "$,15t(B")
- ("$(5!T(B" . "$,15u(B")
- ("$(5!U(B" . "$,15v(B")
- ("$(5!V(B" . "$,15w(B")
- ("$(5!W(B" . "$,15x(B")
- ("$(5!X(B" . "$,15y(B")
- ("$(5!Z(B" . "$,15~(B")
- ("$(5![(B" . "$,15(B")
- ("$(5!\(B" . "$,16 (B")
- ("$(5!](B" . "$,16!(B")
- ("$(5!^(B" . "$,16"(B")
- ("$(5!_(B" . "$,16#(B")
+ ;;2150 $(6!P!Q!R!S!T!U!V!W!X!Y!Z![!\!]!^!_(B
+ ("$(6!P(B" . "$,15q(B")
+ ("$(6!Q(B" . "$,15r(B")
+ ("$(6!R(B" . "$,15s(B")
+ ("$(6!S(B" . "$,15t(B")
+ ("$(6!T(B" . "$,15u(B")
+ ("$(6!U(B" . "$,15v(B")
+ ("$(6!V(B" . "$,15w(B")
+ ("$(6!W(B" . "$,15x(B")
+ ("$(6!X(B" . "$,15y(B")
+ ("$(6!Z(B" . "$,15~(B")
+ ("$(6![(B" . "$,15(B")
+ ("$(6!\(B" . "$,16 (B")
+ ("$(6!](B" . "$,16!(B")
+ ("$(6!^(B" . "$,16"(B")
+ ("$(6!_(B" . "$,16#(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2160 $(5!`!a!b!c!d!e!f!g!h!i!j!k!l!m!n!o(B
- ("$(5!`(B" . "$,16&(B")
- ("$(5!a(B" . "$,16'(B")
- ("$(5!b(B" . "$,16((B")
- ("$(5!c(B" . "$,16%(B")
- ("$(5!d(B" . "$,16*(B")
- ("$(5!e(B" . "$,16+(B")
- ("$(5!f(B" . "$,16,(B")
- ("$(5!g(B" . "$,16)(B")
- ("$(5!h(B" . "$,16-(B")
- ("$(5!i(B" . "$,15|(B")
- ("$(5!j(B" . "$,16D(B")
- ("$(5!j!j(B" . "$,16E(B")
+ ;;2160 $(6!`!a!b!c!d!e!f!g!h!i!j!k!l!m!n!o(B
+ ("$(6!`(B" . "$,16&(B")
+ ("$(6!a(B" . "$,16'(B")
+ ("$(6!b(B" . "$,16((B")
+ ("$(6!c(B" . "$,16%(B")
+ ("$(6!d(B" . "$,16*(B")
+ ("$(6!e(B" . "$,16+(B")
+ ("$(6!f(B" . "$,16,(B")
+ ("$(6!g(B" . "$,16)(B")
+ ("$(6!h(B" . "$,16-(B")
+ ("$(6!i(B" . "$,15|(B")
+ ("$(6!j(B" . "$,16D(B")
+ ("$(6!j!j(B" . "$,16E(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2170 $(5!p!q!r!s!t!u!v!w!x!y!z!{!|!}!~(B
- ("$(5!q(B" . "$,16F(B")
- ("$(5!r(B" . "$,16G(B")
- ("$(5!s(B" . "$,16H(B")
- ("$(5!t(B" . "$,16I(B")
- ("$(5!u(B" . "$,16J(B")
- ("$(5!v(B" . "$,16K(B")
- ("$(5!w(B" . "$,16L(B")
- ("$(5!x(B" . "$,16M(B")
- ("$(5!y(B" . "$,16N(B")
- ("$(5!z(B" . "$,16O(B")
+ ;;2170 $(6!p!q!r!s!t!u!v!w!x!y!z!{!|!}!~(B
+ ("$(6!q(B" . "$,16F(B")
+ ("$(6!r(B" . "$,16G(B")
+ ("$(6!s(B" . "$,16H(B")
+ ("$(6!t(B" . "$,16I(B")
+ ("$(6!u(B" . "$,16J(B")
+ ("$(6!v(B" . "$,16K(B")
+ ("$(6!w(B" . "$,16L(B")
+ ("$(6!x(B" . "$,16M(B")
+ ("$(6!y(B" . "$,16N(B")
+ ("$(6!z(B" . "$,16O(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2220 $(5"!"""#"$"%"&"'"(")"*"+","-"."/(B
- ("$(5"!(B" . "$,16;6-5p(B")
- ("$(5""(B" . "$,16>6-5p(B")
- ("$(5"#(B" . "$,15U6-5p(B")
- ("$(5"$(B" . "$,15W6-5p(B")
- ("$(5"%(B" . "$,15d6-5p(B")
- ("$(5"&(B" . "$,15j6-5p(B")
- ("$(5"'(B" . "$,15k6-5p(B")
- ("$(5")(B" . "$,15v6-5p(B")
- ("$(5",(B" . "$,15p6!(B")
- ("$(5"-(B" . "$,15p6"(B")
- ("$(5".(B" . "$,15q6!(B")
- ("$(5"/(B" . "$,15q6"(B")
+ ;;2220 $(6"!"""#"$"%"&"'"(")"*"+","-"."/(B
+ ("$(6"!(B" . "$,16;6-5p(B")
+ ("$(6""(B" . "$,16>6-5p(B")
+ ("$(6"#(B" . "$,15U6-5p(B")
+ ("$(6"$(B" . "$,15W6-5p(B")
+ ("$(6"%(B" . "$,15d6-5p(B")
+ ("$(6"&(B" . "$,15j6-5p(B")
+ ("$(6"'(B" . "$,15k6-5p(B")
+ ("$(6")(B" . "$,15v6-5p(B")
+ ("$(6",(B" . "$,15p6!(B")
+ ("$(6"-(B" . "$,15p6"(B")
+ ("$(6".(B" . "$,15q6!(B")
+ ("$(6"/(B" . "$,15q6"(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2230 $(5"0"1"2"3"4"5"6"7"8"9":";"<"=">"?(B
- ("$(5"3(B" . "$,15U6-(B")
- ("$(5"4(B" . "$,15V6-(B")
- ("$(5"5(B" . "$,15W6-(B")
- ("$(5"6(B" . "$,15X6-(B")
- ("$(5"8(B" . "$,15Z6-(B")
- ("$(5"8"q(B" . "$,15Z6-5p6-(B")
- ("$(5":(B" . "$,15\6-(B")
- ("$(5";(B" . "$,15]6-(B")
- ("$(5"<(B" . "$,15^6-(B")
- ("$(5"<(B" . "$,15^6-(B")
+ ;;2230 $(6"0"1"2"3"4"5"6"7"8"9":";"<"=">"?(B
+ ("$(6"3(B" . "$,15U6-(B")
+ ("$(6"4(B" . "$,15V6-(B")
+ ("$(6"5(B" . "$,15W6-(B")
+ ("$(6"6(B" . "$,15X6-(B")
+ ("$(6"8(B" . "$,15Z6-(B")
+ ("$(6"8"q(B" . "$,15Z6-5p6-(B")
+ ("$(6":(B" . "$,15\6-(B")
+ ("$(6";(B" . "$,15]6-(B")
+ ("$(6"<(B" . "$,15^6-(B")
+ ("$(6"<(B" . "$,15^6-(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2240 $(5"@"A"B"C"D"E"F"G"H"I"J"K"L"M"N"O(B
- ("$(5"A(B" . "$,15c6-(B")
- ("$(5"B(B" . "$,15d6-(B")
- ("$(5"C(B" . "$,15e6-(B")
- ("$(5"E(B" . "$,15g6-(B")
- ("$(5"F(B" . "$,15h6-(B")
- ("$(5"G(B" . "$,15i6-(B")
- ("$(5"H(B" . "$,15j6-(B")
- ("$(5"I(B" . "$,15k6-(B")
- ("$(5"J(B" . "$,15l6-(B")
- ("$(5"J(B" . "$,15l6-(B")
- ("$(5"K(B" . "$,15m6-(B")
- ("$(5"L(B" . "$,15n6-(B")
- ("$(5"M(B" . "$,15o6-(B")
- ("$(5"N(B" . "$,16?6-(B")
+ ;;2240 $(6"@"A"B"C"D"E"F"G"H"I"J"K"L"M"N"O(B
+ ("$(6"A(B" . "$,15c6-(B")
+ ("$(6"B(B" . "$,15d6-(B")
+ ("$(6"C(B" . "$,15e6-(B")
+ ("$(6"E(B" . "$,15g6-(B")
+ ("$(6"F(B" . "$,15h6-(B")
+ ("$(6"G(B" . "$,15i6-(B")
+ ("$(6"H(B" . "$,15j6-(B")
+ ("$(6"I(B" . "$,15k6-(B")
+ ("$(6"J(B" . "$,15l6-(B")
+ ("$(6"J(B" . "$,15l6-(B")
+ ("$(6"K(B" . "$,15m6-(B")
+ ("$(6"L(B" . "$,15n6-(B")
+ ("$(6"M(B" . "$,15o6-(B")
+ ("$(6"N(B" . "$,16?6-(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2250 $(5"P"Q"R"S"T"U"V"W"X"Y"Z"["\"]"^"_(B
- ("$(5"Q(B" . "$,15r6-(B")
- ("$(5"R(B" . "$,15s6-(B")
- ("$(5"S(B" . "$,15t6-(B")
- ("$(5"T(B" . "$,15u6-(B")
- ("$(5"U(B" . "$,15v6-(B")
- ("$(5"V(B" . "$,15w6-(B")
- ("$(5"W(B" . "$,15x6-(B")
- ("$(5"](B" . "$,16-5o(B")
+ ;;2250 $(6"P"Q"R"S"T"U"V"W"X"Y"Z"["\"]"^"_(B
+ ("$(6"Q(B" . "$,15r6-(B")
+ ("$(6"R(B" . "$,15s6-(B")
+ ("$(6"S(B" . "$,15t6-(B")
+ ("$(6"T(B" . "$,15u6-(B")
+ ("$(6"U(B" . "$,15v6-(B")
+ ("$(6"V(B" . "$,15w6-(B")
+ ("$(6"W(B" . "$,15x6-(B")
+ ("$(6"](B" . "$,16-5o(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2260 $(5"`"a"b"c"d"e"f"g"h"i"j"k"l"m"n"o(B
- ("$(5"`(B" . "$,15W6-5p6-(B")
- ("$(5"a(B" . "$,15X6-5h6-(B")
- ("$(5"c(B" . "$,15d6-5d6-(B")
- ("$(5"d(B" . "$,15d6-5p6-(B")
- ("$(5"e(B" . "$,15g6-5h6-(B")
- ("$(5"f(B" . "$,15g6-5p6-(B")
- ("$(5"g(B" . "$,15j6-5d6-(B")
- ("$(5"h(B" . "$,15v6-5Z6-(B")
- ("$(5"i(B" . "$,15v6-5p6-(B")
- ("$(5"j(B" . "$,15v6-5u6-(B")
- ("$(5"k(B" . "$,15h6-5h6-(B")
- ("$(5"l(B" . "$,15U6-5w6-(B")
- ("$(5"m(B" . "$,15\6-5^6-(B")
+ ;;2260 $(6"`"a"b"c"d"e"f"g"h"i"j"k"l"m"n"o(B
+ ("$(6"`(B" . "$,15W6-5p6-(B")
+ ("$(6"a(B" . "$,15X6-5h6-(B")
+ ("$(6"c(B" . "$,15d6-5d6-(B")
+ ("$(6"d(B" . "$,15d6-5p6-(B")
+ ("$(6"e(B" . "$,15g6-5h6-(B")
+ ("$(6"f(B" . "$,15g6-5p6-(B")
+ ("$(6"g(B" . "$,15j6-5d6-(B")
+ ("$(6"h(B" . "$,15v6-5Z6-(B")
+ ("$(6"i(B" . "$,15v6-5p6-(B")
+ ("$(6"j(B" . "$,15v6-5u6-(B")
+ ("$(6"k(B" . "$,15h6-5h6-(B")
+ ("$(6"l(B" . "$,15U6-5w6-(B")
+ ("$(6"m(B" . "$,15\6-5^6-(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2270 $(5"p"q"r"s"t"u"v"w"x"y"z"{"|"}"~(B
- ("$(5"p(B" . "$,15p6-(B")
- ("$(5"q(B" . "$,16-5p(B")
- ("$(5"r(B" . "$,16-5p(B")
- ("$(5"s(B" . "$,1686-(B")
- ("$(5"t(B" . "$,1696-(B")
- ("$(5"u(B" . "$,16:6-(B")
- ("$(5"y(B" . "$,16>6-(B")
- ("$(5"z(B" . "$,16;6-(B")
+ ;;2270 $(6"p"q"r"s"t"u"v"w"x"y"z"{"|"}"~(B
+ ("$(6"p(B" . "$,15p6-(B")
+ ("$(6"q(B" . "$,16-5p(B")
+ ("$(6"r(B" . "$,16-5p(B")
+ ("$(6"s(B" . "$,1686-(B")
+ ("$(6"t(B" . "$,1696-(B")
+ ("$(6"u(B" . "$,16:6-(B")
+ ("$(6"y(B" . "$,16>6-(B")
+ ("$(6"z(B" . "$,16;6-(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2320 $(5#!#"###$#%#&#'#(#)#*#+#,#-#.#/(B
- ("$(5#!(B" . "$,160(B")
- ("$(5#&(B" . "$,15L(B")
- ("$(5#&"p(B" . "$,15p6$(B")
- ("$(5#'(B" . "$,16A(B")
- ("$(5#'"p(B" . "$,15p6C(B")
- ("$(5#*(B" . "$,16@(B")
- ("$(5#*"p(B" . "$,15p6B(B")
+ ;;2320 $(6#!#"###$#%#&#'#(#)#*#+#,#-#.#/(B
+ ("$(6#!(B" . "$,160(B")
+ ("$(6#&(B" . "$,15L(B")
+ ("$(6#&"p(B" . "$,15p6$(B")
+ ("$(6#'(B" . "$,16A(B")
+ ("$(6#'"p(B" . "$,15p6C(B")
+ ("$(6#*(B" . "$,16@(B")
+ ("$(6#*"p(B" . "$,15p6B(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2330 $(5#0#1#2#3#4#5#6#7#8#9#:#;#<#=#>#?(B
- ("$(5#3(B" . "$,168(B")
- ("$(5#4(B" . "$,169(B")
- ("$(5#5(B" . "$,16:(B")
- ("$(5#:(B" . "$,16;(B")
- ("$(5#?(B" . "$,16<(B")
+ ;;2330 $(6#0#1#2#3#4#5#6#7#8#9#:#;#<#=#>#?(B
+ ("$(6#3(B" . "$,168(B")
+ ("$(6#4(B" . "$,169(B")
+ ("$(6#5(B" . "$,16:(B")
+ ("$(6#:(B" . "$,16;(B")
+ ("$(6#?(B" . "$,16<(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2340 $(5#@#A#B#C#D#E#F#G#H#I#J#K#L#M#N#O(B
- ("$(5#@(B" . "$,16=(B")
- ("$(5#I(B" . "$,16>(B")
- ("$(5#J(B" . "$,15}(B")
- ("$(5#K(B" . "$,16$(B")
- ("$(5#L(B" . "$,16B(B")
- ("$(5#M(B" . "$,16C(B")
+ ;;2340 $(6#@#A#B#C#D#E#F#G#H#I#J#K#L#M#N#O(B
+ ("$(6#@(B" . "$,16=(B")
+ ("$(6#I(B" . "$,16>(B")
+ ("$(6#J(B" . "$,15}(B")
+ ("$(6#K(B" . "$,16$(B")
+ ("$(6#L(B" . "$,16B(B")
+ ("$(6#M(B" . "$,16C(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2350 $(5#P#Q#R#S#T#U#V#W#X#Y#Z#[#\#]#^#_(B
- ("$(5#P(B" . "$,15n6-5h(B")
- ("$(5#Q(B" . "$,15n6-5r(B")
- ("$(5#R(B" . "$,15y6#(B")
+ ;;2350 $(6#P#Q#R#S#T#U#V#W#X#Y#Z#[#\#]#^#_(B
+ ("$(6#P(B" . "$,15n6-5h(B")
+ ("$(6#Q(B" . "$,15n6-5r(B")
+ ("$(6#R(B" . "$,15y6#(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2360 $(5#`#a#b#c#d#e#f#g#h#i#j#k#l#m#n#o(B
- ("$(5#`(B" . "$,15r6-5r(B")
- ("$(5#a(B" . "$,15u6-5h(B")
- ("$(5#b(B" . "$,15u6-5u(B")
- ("$(5#c(B" . "$,15v6-5Z(B")
- ("$(5#d(B" . "$,15v6-5h(B")
- ("$(5#e(B" . "$,15v6-5l(B")
- ("$(5#f(B" . "$,15v6-5r(B")
- ("$(5#g(B" . "$,15v6-5u(B")
- ("$(5#h(B" . "$,15w6-5_6-5p6-5o(B")
- ("$(5#i(B" . "$,15w6-5_6-5o(B")
- ("$(5#j(B" . "$,15w6-5_6-5u(B")
- ("$(5#k(B" . "$,15w6-5_(B")
- ("$(5#l(B" . "$,15w6-5`(B")
- ("$(5#m(B" . "$,15x6-5h(B")
- ("$(5#n(B" . "$,15x6-5p(B")
+ ;;2360 $(6#`#a#b#c#d#e#f#g#h#i#j#k#l#m#n#o(B
+ ("$(6#`(B" . "$,15r6-5r(B")
+ ("$(6#a(B" . "$,15u6-5h(B")
+ ("$(6#b(B" . "$,15u6-5u(B")
+ ("$(6#c(B" . "$,15v6-5Z(B")
+ ("$(6#d(B" . "$,15v6-5h(B")
+ ("$(6#e(B" . "$,15v6-5l(B")
+ ("$(6#f(B" . "$,15v6-5r(B")
+ ("$(6#g(B" . "$,15v6-5u(B")
+ ("$(6#h(B" . "$,15w6-5_6-5p6-5o(B")
+ ("$(6#i(B" . "$,15w6-5_6-5o(B")
+ ("$(6#j(B" . "$,15w6-5_6-5u(B")
+ ("$(6#k(B" . "$,15w6-5_(B")
+ ("$(6#l(B" . "$,15w6-5`(B")
+ ("$(6#m(B" . "$,15x6-5h(B")
+ ("$(6#n(B" . "$,15x6-5p(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2370 $(5#p#q#r#s#t#u#v#w#x#y#z#{#|#}#~(B
- ("$(5#p(B" . "$,15y6-5c(B")
- ("$(5#q(B" . "$,15y6-5h(B")
- ("$(5#r(B" . "$,15y6-5n(B")
- ("$(5#s(B" . "$,15y6-5o(B")
- ("$(5#t(B" . "$,15y6-5p(B")
- ("$(5#u(B" . "$,15y6-5r(B")
- ("$(5#v(B" . "$,15y6-5u(B")
+ ;;2370 $(6#p#q#r#s#t#u#v#w#x#y#z#{#|#}#~(B
+ ("$(6#p(B" . "$,15y6-5c(B")
+ ("$(6#q(B" . "$,15y6-5h(B")
+ ("$(6#r(B" . "$,15y6-5n(B")
+ ("$(6#s(B" . "$,15y6-5o(B")
+ ("$(6#t(B" . "$,15y6-5p(B")
+ ("$(6#u(B" . "$,15y6-5r(B")
+ ("$(6#v(B" . "$,15y6-5u(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2420 $(5$!$"$#$$$%$&$'$($)$*$+$,$-$.$/(B
- ("$(5$!(B" . "$,15U6-5d6-5p6-5o(B")
- ("$(5$"(B" . "$,15U6-5d6-5u(B")
- ("$(5$#(B" . "$,15U6-5d6-5o(B")
- ("$(5$$(B" . "$,15U6-5h6-5o(B")
- ("$(5$%(B" . "$,15U6-5p6-5o(B")
- ("$(5$&(B" . "$,15U6-5u6-5o(B")
- ("$(5$'(B" . "$,15U6-5U(B")
- ("$(5$((B" . "$,15U6-5d(B")
- ("$(5$)(B" . "$,15U6-5h(B")
- ("$(5$*(B" . "$,15U6-5n(B")
- ("$(5$+(B" . "$,15U6-5o(B")
- ("$(5$,(B" . "$,15U6-5r(B")
- ("$(5$-(B" . "$,15U6-5u(B")
- ("$(5$.(B" . "$,15U6-5w(B")
- ("$(5$/(B" . "$,15X6-5h(B")
+ ;;2420 $(6$!$"$#$$$%$&$'$($)$*$+$,$-$.$/(B
+ ("$(6$!(B" . "$,15U6-5d6-5p6-5o(B")
+ ("$(6$"(B" . "$,15U6-5d6-5u(B")
+ ("$(6$#(B" . "$,15U6-5d6-5o(B")
+ ("$(6$$(B" . "$,15U6-5h6-5o(B")
+ ("$(6$%(B" . "$,15U6-5p6-5o(B")
+ ("$(6$&(B" . "$,15U6-5u6-5o(B")
+ ("$(6$'(B" . "$,15U6-5U(B")
+ ("$(6$((B" . "$,15U6-5d(B")
+ ("$(6$)(B" . "$,15U6-5h(B")
+ ("$(6$*(B" . "$,15U6-5n(B")
+ ("$(6$+(B" . "$,15U6-5o(B")
+ ("$(6$,(B" . "$,15U6-5r(B")
+ ("$(6$-(B" . "$,15U6-5u(B")
+ ("$(6$.(B" . "$,15U6-5w(B")
+ ("$(6$/(B" . "$,15X6-5h(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2430 $(5$0$1$2$3$4$5$6$7$8$9$:$;$<$=$>$?(B
- ("$(5$0(B" . "$,15Y6-5U6-5d6-5o(B")
- ("$(5$1(B" . "$,15Y6-5U6-5w6-5u(B")
- ("$(5$2(B" . "$,15Y6-5U6-5d(B")
- ("$(5$3(B" . "$,15Y6-5U6-5w(B")
- ("$(5$4(B" . "$,15Y6-5X6-5p(B")
- ("$(5$5(B" . "$,15Y6-5U6-5o(B")
- ("$(5$6(B" . "$,15Y6-5V6-5o(B")
- ("$(5$7(B" . "$,15Y6-5W6-5o(B")
- ("$(5$8(B" . "$,15Y6-5X6-5o(B")
- ("$(5$9(B" . "$,15Y6-5U(B")
- ("$(5$:(B" . "$,15Y6-5V(B")
- ("$(5$;(B" . "$,15Y6-5W(B")
- ("$(5$<(B" . "$,15Y6-5X(B")
- ("$(5$=(B" . "$,15Y6-5Y(B")
- ("$(5$>(B" . "$,15Y6-5h(B")
- ("$(5$?(B" . "$,15Y6-5n(B")
+ ;;2430 $(6$0$1$2$3$4$5$6$7$8$9$:$;$<$=$>$?(B
+ ("$(6$0(B" . "$,15Y6-5U6-5d6-5o(B")
+ ("$(6$1(B" . "$,15Y6-5U6-5w6-5u(B")
+ ("$(6$2(B" . "$,15Y6-5U6-5d(B")
+ ("$(6$3(B" . "$,15Y6-5U6-5w(B")
+ ("$(6$4(B" . "$,15Y6-5X6-5p(B")
+ ("$(6$5(B" . "$,15Y6-5U6-5o(B")
+ ("$(6$6(B" . "$,15Y6-5V6-5o(B")
+ ("$(6$7(B" . "$,15Y6-5W6-5o(B")
+ ("$(6$8(B" . "$,15Y6-5X6-5o(B")
+ ("$(6$9(B" . "$,15Y6-5U(B")
+ ("$(6$:(B" . "$,15Y6-5V(B")
+ ("$(6$;(B" . "$,15Y6-5W(B")
+ ("$(6$<(B" . "$,15Y6-5X(B")
+ ("$(6$=(B" . "$,15Y6-5Y(B")
+ ("$(6$>(B" . "$,15Y6-5h(B")
+ ("$(6$?(B" . "$,15Y6-5n(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2440 $(5$@$A$B$C$D$E$F$G$H$I$J$K$L$M$N$O(B
- ("$(5$@(B" . "$,15Y6-5o(B")
- ("$(5$A(B" . "$,15Z6-5Z(B")
- ("$(5$B(B" . "$,15Z6-5^(B")
- ("$(5$C(B" . "$,15[6-5o(B")
- ("$(5$D(B" . "$,15\6-5p(B")
- ("$(5$E(B" . "$,15\6-5^(B")
- ("$(5$F(B" . "$,15^6-5Z(B")
- ("$(5$G(B" . "$,15^6-5\(B")
- ("$(5$H(B" . "$,15_6-5U(B")
- ("$(5$I(B" . "$,15_6-5_(B")
- ("$(5$J(B" . "$,15_6-5`(B")
- ("$(5$K(B" . "$,15_6-5o(B")
- ("$(5$L(B" . "$,15`6-5o(B")
- ("$(5$M(B" . "$,15a6-5W6-5o(B")
- ("$(5$N(B" . "$,15a6-5X6-5p(B")
- ("$(5$O(B" . "$,15a6-5p6-5o(B")
+ ;;2440 $(6$@$A$B$C$D$E$F$G$H$I$J$K$L$M$N$O(B
+ ("$(6$@(B" . "$,15Y6-5o(B")
+ ("$(6$A(B" . "$,15Z6-5Z(B")
+ ("$(6$B(B" . "$,15Z6-5^(B")
+ ("$(6$C(B" . "$,15[6-5o(B")
+ ("$(6$D(B" . "$,15\6-5p(B")
+ ("$(6$E(B" . "$,15\6-5^(B")
+ ("$(6$F(B" . "$,15^6-5Z(B")
+ ("$(6$G(B" . "$,15^6-5\(B")
+ ("$(6$H(B" . "$,15_6-5U(B")
+ ("$(6$I(B" . "$,15_6-5_(B")
+ ("$(6$J(B" . "$,15_6-5`(B")
+ ("$(6$K(B" . "$,15_6-5o(B")
+ ("$(6$L(B" . "$,15`6-5o(B")
+ ("$(6$M(B" . "$,15a6-5W6-5o(B")
+ ("$(6$N(B" . "$,15a6-5X6-5p(B")
+ ("$(6$O(B" . "$,15a6-5p6-5o(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2450 $(5$P$Q$R$S$T$U$V$W$X$Y$Z$[$\$]$^$_(B
- ("$(5$P(B" . "$,15a6-5W(B")
- ("$(5$Q(B" . "$,15a6-5X(B")
- ("$(5$R(B" . "$,15a6-5a(B")
- ("$(5$S(B" . "$,15a6-5n(B")
- ("$(5$T(B" . "$,15a6-5o(B")
+ ;;2450 $(6$P$Q$R$S$T$U$V$W$X$Y$Z$[$\$]$^$_(B
+ ("$(6$P(B" . "$,15a6-5W(B")
+ ("$(6$Q(B" . "$,15a6-5X(B")
+ ("$(6$R(B" . "$,15a6-5a(B")
+ ("$(6$S(B" . "$,15a6-5n(B")
+ ("$(6$T(B" . "$,15a6-5o(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2460 $(5$`$a$b$c$d$e$f$g$h$i$j$k$l$m$n$o(B
- ("$(5$`(B" . "$,15b6-5o(B")
- ("$(5$a(B" . "$,15d6-5d(B")
- ("$(5$b(B" . "$,15d6-5h(B")
- ("$(5$c(B" . "$,15f6-5f6-5o(B")
- ("$(5$d(B" . "$,15f6-5g6-5o(B")
- ("$(5$e(B" . "$,15f6-5m6-5o(B")
- ("$(5$f(B" . "$,15f6-5p6-5o(B")
- ("$(5$g(B" . "$,15f6-5u6-5o(B")
- ("$(5$h(B" . "$,15f6-5W6-5p(B")
- ("$(5$i(B" . "$,15f6-5X6-5p(B")
- ("$(5$j(B" . "$,15f6-5f6-5u(B")
- ("$(5$k(B" . "$,15f6-5g6-5u(B")
- ("$(5$l(B" . "$,15f6-5W(B")
- ("$(5$m(B" . "$,15f6-5X(B")
- ("$(5$n(B" . "$,15f6-5f(B")
- ("$(5$o(B" . "$,15f6-5g(B")
+ ;;2460 $(6$`$a$b$c$d$e$f$g$h$i$j$k$l$m$n$o(B
+ ("$(6$`(B" . "$,15b6-5o(B")
+ ("$(6$a(B" . "$,15d6-5d(B")
+ ("$(6$b(B" . "$,15d6-5h(B")
+ ("$(6$c(B" . "$,15f6-5f6-5o(B")
+ ("$(6$d(B" . "$,15f6-5g6-5o(B")
+ ("$(6$e(B" . "$,15f6-5m6-5o(B")
+ ("$(6$f(B" . "$,15f6-5p6-5o(B")
+ ("$(6$g(B" . "$,15f6-5u6-5o(B")
+ ("$(6$h(B" . "$,15f6-5W6-5p(B")
+ ("$(6$i(B" . "$,15f6-5X6-5p(B")
+ ("$(6$j(B" . "$,15f6-5f6-5u(B")
+ ("$(6$k(B" . "$,15f6-5g6-5u(B")
+ ("$(6$l(B" . "$,15f6-5W(B")
+ ("$(6$m(B" . "$,15f6-5X(B")
+ ("$(6$n(B" . "$,15f6-5f(B")
+ ("$(6$o(B" . "$,15f6-5g(B")
;; 0 1 2 3 4 5 6 7 8 9 a b c d e f
- ;;2470 $(5$p$q$r$s$t$u$v$w$x$y$z${$|$}$~(B
- ("$(5$p(B" . "$,15f6-5h(B")
- ("$(5$q(B" . "$,15f6-5l(B")
- ("$(5$r(B" . "$,15f6-5m(B")
- ("$(5$s(B" . "$,15f6-5n(B")
- ("$(5$t(B" . "$,15f6-5o(B")
- ("$(5$u(B" . "$,15f6-5u(B")
- ("$(5$v(B" . "$,15g6-5h(B")
- ("$(5$w(B" . "$,15h6-5h(B")
- ("$(5$x(B" . "$,15j6-5d(B")
- ("$(5$y(B" . "$,15j6-5h(B")
- ("$(5$z(B" . "$,15j6-5r(B")
- ("$(5${(B" . "$,15l6-5h(B")
- ("$(5$|(B" . "$,15l6-5l(B")
- ("$(5$}(B" . "$,15l6-5u(B")
- ("$(5$~(B" . "$,15m6-5h(B")))
+ ;;2470 $(6$p$q$r$s$t$u$v$w$x$y$z${$|$}$~(B
+ ("$(6$p(B" . "$,15f6-5h(B")
+ ("$(6$q(B" . "$,15f6-5l(B")
+ ("$(6$r(B" . "$,15f6-5m(B")
+ ("$(6$s(B" . "$,15f6-5n(B")
+ ("$(6$t(B" . "$,15f6-5o(B")
+ ("$(6$u(B" . "$,15f6-5u(B")
+ ("$(6$v(B" . "$,15g6-5h(B")
+ ("$(6$w(B" . "$,15h6-5h(B")
+ ("$(6$x(B" . "$,15j6-5d(B")
+ ("$(6$y(B" . "$,15j6-5h(B")
+ ("$(6$z(B" . "$,15j6-5r(B")
+ ("$(6${(B" . "$,15l6-5h(B")
+ ("$(6$|(B" . "$,15l6-5l(B")
+ ("$(6$}(B" . "$,15l6-5u(B")
+ ("$(6$~(B" . "$,15m6-5h(B")))
(defconst indian-2-column-to-ucs-regexp
- "$(5!j!j(B\\|$(5"8"q(B\\|[$(5#&#'!*#*(B]$(5"p(B\\|[$(5!!(B-$(5$~(B]")
+ "$(6!j!j(B\\|$(6"8"q(B\\|[$(6#&#'!*#*(B]$(6"p(B\\|[$(6!!(B-$(6$~(B]")
(put 'indian-2-column-to-ucs-chartable 'char-table-extra-slots 1)
(defconst indian-2-column-to-ucs-chartable
(let ((table (make-char-table 'indian-2-column-to-ucs-chartable))
- (alist nil))
+ (alist nil))
(dolist (elt indian-2-colum-to-ucs)
(if (= (length (car elt)) 1)
- (aset table (aref (car elt) 0) (cdr elt))
- (setq alist (cons elt alist))))
+ (aset table (aref (car elt) 0) (cdr elt))
+ (setq alist (cons elt alist))))
(set-char-table-extra-slot table 0 alist)
table))
+;;;###autoload
(defun indian-2-column-to-ucs-region (from to)
"Convert old Emacs Devanagari characters to UCS."
(interactive "r")
(save-excursion
(save-restriction
(let ((pos from)
- (alist (char-table-extra-slot indian-2-column-to-ucs-chartable 0)))
- (narrow-to-region from to)
- (decompose-region from to)
- (goto-char (point-min))
- (while (re-search-forward indian-2-column-to-ucs-regexp nil t)
- (let ((len (- (match-end 0) (match-beginning 0)))
- subst)
- (if (= len 1)
- (setq subst (aref indian-2-column-to-ucs-chartable
+ (alist (char-table-extra-slot indian-2-column-to-ucs-chartable 0)))
+ (narrow-to-region from to)
+ (decompose-region from to)
+ (goto-char (point-min))
+ (while (re-search-forward indian-2-column-to-ucs-regexp nil t)
+ (let ((len (- (match-end 0) (match-beginning 0)))
+ subst)
+ (if (= len 1)
+ (setq subst (aref indian-2-column-to-ucs-chartable
(char-after (match-beginning 0))))
- (setq subst (cdr (assoc (match-string 0) alist))))
- (replace-match (if subst subst "?"))))
- (indian-compose-region (point-min) (point-max))))))
-
-;;;###autoload
-(defun indian-glyph-char (index &optional script)
- "Return character of charset `indian-glyph' made from glyph index INDEX.
-The variable `indian-default-script' specifies the script of the glyph.
-Optional argument SCRIPT, if non-nil, overrides `indian-default-script'.
-See also the function `indian-char-glyph'."
- (or script
- (setq script indian-default-script))
- (let ((offset (get script 'indian-glyph-code-offset)))
- (or (integerp offset)
- (error "Invalid script name: %s" script))
- (or (and (>= index 0) (< index 256))
- (error "Invalid glyph index: %d" index))
- (setq index (+ offset index))
- (make-char 'indian-glyph (+ (/ index 96) 32) (+ (% index 96) 32))))
-
-(defvar indian-glyph-max-char
- (indian-glyph-char
- 255 (aref indian-script-table (1- (length indian-script-table))))
- "The maximum valid code of characters in the charset `indian-glyph'.")
-
-;;;###autoload
-(defun indian-char-glyph (char)
- "Return information about the glyph code for CHAR of `indian-glyph' charset.
-The value is (INDEX . SCRIPT), where INDEX is the glyph index
-in the font that Indian script name SCRIPT specifies.
-See also the function `indian-glyph-char'."
- (let ((split (split-char char))
- code)
- (or (eq (car split) 'indian-glyph)
- (error "Charset of `%c' is not indian-glyph" char))
- (or (<= char indian-glyph-max-char)
- (error "Invalid indian-glyph char: %d" char))
- (setq code (+ (* (- (nth 1 split) 32) 96) (nth 2 split) -32))
- (cons (% code 256) (aref indian-script-table (/ code 256)))))
+ (setq subst (cdr (assoc (match-string 0) alist))))
+ (replace-match (if subst subst "?"))))
+ (indian-compose-region (point-min) (point-max))))))
(provide 'ind-util)
diff --git a/lisp/language/indian.el b/lisp/language/indian.el
index 5d58271463b..9c0425c96d0 100644
--- a/lisp/language/indian.el
+++ b/lisp/language/indian.el
@@ -33,21 +33,16 @@
;;; Code:
-(make-coding-system
- 'in-is13194 2 ?D
- "8-bit encoding for ASCII (MSB=0) and IS13194-Devanagari (MSB=1)."
- '(ascii indian-is13194 nil nil
- nil ascii-eol)
- `((safe-chars . ,(let ((table (make-char-table 'safe-chars nil)))
- (set-char-table-range table 'indian-is13194 t)
- (dotimes (i 127)
- (aset table i t)
- (aset table (decode-char 'ucs (+ #x900 i)) t))
- table))
- (post-read-conversion . in-is13194-post-read-conversion)
- (pre-write-conversion . in-is13194-pre-write-conversion)))
-
-(define-coding-system-alias 'devanagari 'in-is13194)
+(define-coding-system 'in-is13194-devanagari
+ "8-bit encoding for ASCII (MSB=0) and IS13194-Devanagari (MSB=1)."
+ :coding-type 'iso-2022
+ :mnemonic ?D
+ :designation [ascii indian-is13194 nil nil]
+ :charset-list '(ascii indian-is13194)
+ :post-read-conversion 'in-is13194-post-read-conversion
+ :pre-write-conversion 'in-is13194-pre-write-conversion)
+
+(define-coding-system-alias 'devanagari 'in-is13194-devanagari)
(defvar indian-font-foundry 'cdac
"Font foundry for Indian characters.
@@ -160,18 +155,9 @@ Each Indian language environment sets this value
to one of `indian-script-table' (which see).
The default value is `devanagari'.")
-(define-ccl-program ccl-encode-indian-glyph-font
- `(0
- ;; Shorten (r1 = (((((r1 - 32) * 96) + r2) - 32) % 256))
- (r1 = ((((r1 * 96) + r2) - ,(+ (* 32 96) 32)) % 256))))
-
-(setq font-ccl-encoder-alist
- (cons (cons "-CDAC" 'ccl-encode-indian-glyph-font)
- font-ccl-encoder-alist))
-
-(setq font-ccl-encoder-alist
- (cons (cons "-AKRUTI" 'ccl-encode-indian-glyph-font)
- font-ccl-encoder-alist))
+(defvar indian-composable-pattern
+ (make-char-table nil)
+ "Char table of regexps for composable Indian character sequence.")
(provide 'indian)
diff --git a/lisp/language/japanese.el b/lisp/language/japanese.el
index 12a09423a32..590167ad560 100644
--- a/lisp/language/japanese.el
+++ b/lisp/language/japanese.el
@@ -6,6 +6,9 @@
;; 2005, 2006
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
+;; Copyright (C) 2003
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H13PRO009
;; Keywords: multilingual, Japanese
@@ -33,85 +36,220 @@
;;; Code:
-(make-coding-system
- 'iso-2022-jp 2 ?J
- "ISO 2022 based 7bit encoding for Japanese (MIME:ISO-2022-JP)."
- '((ascii japanese-jisx0208-1978 japanese-jisx0208
- latin-jisx0201 japanese-jisx0212) nil nil nil
- short ascii-eol ascii-cntl seven)
- '((safe-charsets ascii japanese-jisx0208-1978 japanese-jisx0208
- latin-jisx0201 japanese-jisx0212)
- (mime-charset . iso-2022-jp)))
+;;; Load translation tables for CP932.
+(load "international/cp51932")
+(load "international/eucjp-ms")
+
+(define-coding-system 'iso-2022-jp
+ "ISO 2022 based 7bit encoding for Japanese (MIME:ISO-2022-JP)."
+ :coding-type 'iso-2022
+ :mnemonic ?J
+ :designation [(ascii japanese-jisx0208-1978 japanese-jisx0208
+ latin-jisx0201)
+ nil nil nil]
+ :flags '(short ascii-at-eol ascii-at-cntl 7-bit designation)
+ :charset-list '(ascii japanese-jisx0208
+ japanese-jisx0208-1978 latin-jisx0201)
+ :mime-charset 'iso-2022-jp
+ :suitable-for-keyboard t)
(define-coding-system-alias 'junet 'iso-2022-jp)
-(make-coding-system
- 'iso-2022-jp-2 2 ?J
- "ISO 2022 based 7bit encoding for CJK, Latin-1, and Greek (MIME:ISO-2022-JP-2)."
- '((ascii japanese-jisx0208-1978 japanese-jisx0208
- latin-jisx0201 japanese-jisx0212
- chinese-gb2312 korean-ksc5601) nil
- (nil latin-iso8859-1 greek-iso8859-7) nil
- short ascii-eol ascii-cntl seven nil single-shift nil nil nil init-bol)
- '((safe-charsets ascii japanese-jisx0208-1978 japanese-jisx0208
- latin-jisx0201 japanese-jisx0212
- chinese-gb2312 korean-ksc5601
- latin-iso8859-1 greek-iso8859-7)
- (mime-charset . iso-2022-jp-2)))
-
-(make-coding-system
- 'japanese-shift-jis 1 ?S
- "Shift-JIS 8-bit encoding for Japanese (MIME:SHIFT_JIS)."
- nil
- '((safe-charsets ascii japanese-jisx0208 japanese-jisx0208-1978
- latin-jisx0201 katakana-jisx0201)
- (mime-charset . shift_jis)
- (charset-origin-alist (japanese-jisx0208 "SJIS" encode-sjis-char)
- (katakana-jisx0201 "SJIS" encode-sjis-char))))
+(define-coding-system 'iso-2022-jp-2
+ "ISO 2022 based 7bit encoding for CJK, Latin-1, Greek (MIME:ISO-2022-JP-2)."
+ :coding-type 'iso-2022
+ :mnemonic ?J
+ :designation [(ascii japanese-jisx0208-1978 japanese-jisx0208
+ latin-jisx0201 japanese-jisx0212
+ chinese-gb2312 korean-ksc5601)
+ nil
+ (nil latin-iso8859-1 greek-iso8859-7)
+ nil]
+ :flags '(short ascii-at-eol ascii-at-cntl 7-bit designation single-shift
+ init-at-bol)
+ :charset-list '(ascii japanese-jisx0208 japanese-jisx0212
+ latin-jisx0201 japanese-jisx0208-1978
+ chinese-gb2312 korean-ksc5601
+ latin-iso8859-1 greek-iso8859-7)
+ :mime-charset 'iso-2022-jp-2
+ :suitable-for-keyboard t)
+
+(let ((map ; JIS vs CP932
+ '((#x301C . #xFF5E) ; WAVE DASH FULLWIDTH TILDE
+ (#x2014 . #x2015) ; EM DASH HORIZONTAL BAR
+ (#x2016 . #x2225) ; DOUBLE VERTICAL LINE PARALLEL TO
+ (#x2212 . #xFF0D) ; MINUS SIGN FULLWIDTH HYPHEN-MINUS
+ (#x00A2 . #xFFE0) ; CENT SIGN FULLWIDTH CENT SIGN
+ (#x00A3 . #xFFE1) ; POUND SIGN FULLWIDTH POUND SIGN
+ (#x00AC . #xFFE2) ; NOT SIGN FULLWIDTH NOT SIGN
+ (#x00A6 . #xFFE4) ; BROKEN LINE FULLWIDTH BROKEN LINE
+ )))
+ (define-translation-table 'japanese-ucs-jis-to-cp932-map map)
+ (mapc #'(lambda (x) (let ((tmp (car x)))
+ (setcar x (cdr x)) (setcdr x tmp)))
+ map)
+ (define-translation-table 'japanese-ucs-cp932-to-jis-map map))
+
+;; U+2014 (EM DASH) vs U+2015 (HORIZONTAL BAR)
+(define-translation-table 'japanese-ucs-glibc-to-jis-map '((#x2015 . #x2014)))
+(define-translation-table 'japanese-ucs-jis-to-glibc-map '((#x2014 . #x2015)))
+
+(define-coding-system 'japanese-shift-jis
+ "Shift-JIS 8-bit encoding for Japanese (MIME:SHIFT_JIS)"
+ :coding-type 'shift-jis
+ :mnemonic ?S
+ :charset-list '(ascii katakana-jisx0201 japanese-jisx0208)
+ :mime-charset 'shift_jis)
(define-coding-system-alias 'shift_jis 'japanese-shift-jis)
(define-coding-system-alias 'sjis 'japanese-shift-jis)
(define-coding-system-alias 'cp932 'japanese-shift-jis)
-(make-coding-system
- 'japanese-iso-7bit-1978-irv 2 ?j
- "ISO 2022 based 7-bit encoding for Japanese JISX0208-1978 and JISX0201-Roman."
- '((ascii japanese-jisx0208-1978 japanese-jisx0208
- latin-jisx0201 japanese-jisx0212 katakana-jisx0201 t) nil nil nil
- short ascii-eol ascii-cntl seven nil nil use-roman use-oldjis)
- '(ascii japanese-jisx0208-1978 japanese-jisx0208 latin-jisx0201))
+(define-coding-system 'japanese-cp932
+ "CP932 (Microsoft shift-jis)"
+ :coding-type 'charset
+ :mnemonic ?S
+ :charset-list '(ascii katakana-sjis cp932-2-byte))
+
+(define-coding-system-alias 'cp932 'japanese-cp932)
+
+(define-coding-system 'japanese-iso-7bit-1978-irv
+ "ISO 2022 based 7-bit encoding for Japanese JISX0208-1978 and JISX0201-Roman."
+ :coding-type 'iso-2022
+ :mnemonic ?j
+ :designation [(latin-jisx0201 japanese-jisx0208-1978 japanese-jisx0208
+ japanese-jisx0212 katakana-jisx0201)
+ nil nil nil]
+ :flags '(short ascii-at-eol ascii-at-cntl 7-bit designation
+ use-roman use-oldjis)
+ :charset-list '(ascii latin-jisx0201 japanese-jisx0208-1978 japanese-jisx0208
+ japanese-jisx0212))
(define-coding-system-alias 'iso-2022-jp-1978-irv 'japanese-iso-7bit-1978-irv)
(define-coding-system-alias 'old-jis 'japanese-iso-7bit-1978-irv)
-(make-coding-system
- 'japanese-iso-8bit 2 ?E
- "ISO 2022 based EUC encoding for Japanese (MIME:EUC-JP)."
- '(ascii japanese-jisx0208 katakana-jisx0201 japanese-jisx0212
- short ascii-eol ascii-cntl nil nil single-shift)
- '((safe-charsets ascii latin-jisx0201 japanese-jisx0208 japanese-jisx0208-1978
- katakana-jisx0201 japanese-jisx0212)
- (mime-charset . euc-jp)))
+(define-coding-system 'japanese-iso-8bit
+ "ISO 2022 based EUC encoding for Japanese (MIME:EUC-JP)."
+ :coding-type 'iso-2022
+ :mnemonic ?E
+ :designation [ascii japanese-jisx0208 katakana-jisx0201 japanese-jisx0212]
+ :flags '(short ascii-at-eol ascii-at-cntl single-shift)
+ :charset-list '(ascii latin-jisx0201 japanese-jisx0208
+ katakana-jisx0201 japanese-jisx0212
+ japanese-jisx0208-1978)
+ :mime-charset 'euc-jp)
(define-coding-system-alias 'euc-japan-1990 'japanese-iso-8bit)
(define-coding-system-alias 'euc-japan 'japanese-iso-8bit)
(define-coding-system-alias 'euc-jp 'japanese-iso-8bit)
+(define-coding-system 'eucjp-ms
+ "eucJP-ms (like EUC-JP but with CP932 extension).
+eucJP-ms is defined in <http://www.opengroup.or.jp/jvc/cde/appendix.html>."
+ :coding-type 'iso-2022
+ :mnemonic ?E
+ :designation [ascii japanese-jisx0208 katakana-jisx0201 japanese-jisx0212]
+ :flags '(short ascii-at-eol ascii-at-cntl single-shift)
+ :charset-list '(ascii latin-jisx0201 japanese-jisx0208
+ katakana-jisx0201 japanese-jisx0212)
+ :decode-translation-table 'eucjp-ms-decode
+ :encode-translation-table 'eucjp-ms-encode)
+
+(define-coding-system 'iso-2022-jp-2004
+ "ISO 2022 based 7bit encoding for JIS X 0213:2004 (MIME:ISO-2022-JP-2004)."
+ :coding-type 'iso-2022
+ :mnemonic ?J
+ :designation [(ascii japanese-jisx0208 japanese-jisx0213.2004-1
+ japanese-jisx0213-1 japanese-jisx0213-2)
+ nil nil nil]
+ :flags '(short ascii-at-eol ascii-at-cntl 7-bit designation)
+ ;; init-at-bol)
+ :charset-list '(ascii japanese-jisx0208 japanese-jisx0213.2004-1
+ japanese-jisx0213-1 japanese-jisx0213-2)
+ :mime-charset 'iso-2022-jp-2004
+ :suitable-for-keyboard t)
+
+(define-coding-system-alias 'iso-2022-jp-3 'iso-2022-jp-2004)
+
+(define-coding-system 'euc-jis-2004
+ "ISO 2022 based EUC encoding for JIS X 0213 (MIME:EUC-JIS-2004)."
+ :coding-type 'iso-2022
+ :mnemonic ?E
+ :designation [ascii japanese-jisx0213.2004-1 katakana-jisx0201
+ japanese-jisx0213-2]
+ :flags '(short ascii-at-eol ascii-at-cntl single-shift)
+ :charset-list '(ascii latin-jisx0201 japanese-jisx0213.2004-1
+ japanese-jisx0213-1 katakana-jisx0201
+ japanese-jisx0213-2)
+ :mime-charset 'euc-jis-2004)
+
+(define-coding-system-alias 'euc-jisx0213 'euc-jis-2004)
+
+(define-coding-system 'japanese-shift-jis-2004
+ "Shift_JIS 8-bit encodinf for Japanese (MIME:SHIFT_JIS-2004)"
+ :coding-type 'shift-jis
+ :mnemonic ?S
+ :charset-list '(ascii katakana-jisx0201
+ japanese-jisx0213.2004-1 japanese-jisx0213-2))
+
+(define-coding-system-alias 'shift_jis-2004 'japanese-shift-jis-2004)
+
(set-language-info-alist
"Japanese" '((setup-function . setup-japanese-environment-internal)
(tutorial . "TUTORIAL.ja")
- (charset japanese-jisx0208 japanese-jisx0208-1978
+ (charset japanese-jisx0208
japanese-jisx0212 latin-jisx0201 katakana-jisx0201
- japanese-jisx0213-1 japanese-jisx0213-2)
+ japanese-jisx0213.2004-1 japanese-jisx0213-1
+ japanese-jisx0213-2 japanese-jisx0208-1978)
(coding-system iso-2022-jp japanese-iso-8bit
- japanese-shift-jis japanese-iso-7bit-1978-irv)
+ japanese-shift-jis japanese-iso-7bit-1978-irv
+ iso-2022-jp-2004 japanese-shift-jis-2004
+ euc-jis-2004)
(coding-priority iso-2022-jp japanese-iso-8bit
- japanese-shift-jis iso-2022-jp-2)
+ japanese-shift-jis
+ iso-2022-jp-2004 euc-jis-2004
+ japanese-shift-jis-2004
+ iso-2022-jp-2)
(input-method . "japanese")
(features japan-util)
(sample-text . "Japanese ($BF|K\8l(B) $B$3$s$K$A$O(B, (I:]FAJ(B")
(documentation . t)))
+(let ((map
+ ;; JISX0213-1 vs Unicode
+ '((#x2477 . [#x304B #x309A])
+ (#x2478 . [#x304D #x309A])
+ (#x2479 . [#x304F #x309A])
+ (#x247a . [#x3051 #x309A])
+ (#x247b . [#x3053 #x309A])
+ (#x2577 . [#x30AB #x309A])
+ (#x2578 . [#x30AD #x309A])
+ (#x2579 . [#x30AF #x309A])
+ (#x257a . [#x30B1 #x309A])
+ (#x257b . [#x30B3 #x309A])
+ (#x257c . [#x30BB #x309A])
+ (#x257d . [#x30C4 #x309A])
+ (#x257e . [#x30C8 #x309A])
+ (#x2678 . [#x31F7 #x309A])
+ (#x2b44 . [#x00E6 #x0300])
+ (#x2b48 . [#x0254 #x0300])
+ (#x2b49 . [#x0254 #x0301])
+ (#x2b4a . [#x028C #x0300])
+ (#x2b4b . [#x028C #x0301])
+ (#x2b4c . [#x0259 #x0300])
+ (#x2b4d . [#x0259 #x0301])
+ (#x2b4e . [#x025A #x0300])
+ (#x2b4f . [#x025A #x0301])
+ (#x2b65 . [#x02E9 #x02E5])
+ (#x2b66 . [#x02E5 #x02E9])))
+ table)
+ (dolist (elt map)
+ (setcar elt (decode-char 'japanese-jisx0213-1 (car elt))))
+ (setq table (make-translation-table-from-alist map))
+ (define-translation-table 'jisx0213-to-unicode table)
+ (define-translation-table 'unicode-to-jisx0213
+ (char-table-extra-slot table 0)))
+
(provide 'japanese)
;;; arch-tag: 450f5537-9d53-4d5e-b731-4cf116d8cbc9
diff --git a/lisp/language/kannada.el b/lisp/language/kannada.el
index 77d793839da..895c272b44e 100644
--- a/lisp/language/kannada.el
+++ b/lisp/language/kannada.el
@@ -38,12 +38,16 @@
(features knd-util)
(sample-text
. (kannada-compose-string
- (copy-sequence "Kannada (4$,43Ov#4z0$,1>u14$,44Kv#4zv#4M0$,1?(?M?(14$,43sv#4z0$,1?!1(B) 4$,44Kv#4z0$,1?(14$,44hv#4zv#40$,1?.14$,44qv#4{v#3Q0$,1?8?M>u?>14$,44av#4z0$,1?01(B")))
+ (copy-sequence "Kannada ($,1>u?(?M?(?!(B) $,1?(?.?8?M>u?>?0(B")))
(documentation . "\
Kannada language and script is supported in this language
environment."))
'("Indian"))
+;; For automatic composition.
+(set-char-table-range composition-function-table '(#x0c80 . #x0cff)
+ 'kannada-composition-function)
+
(provide 'kannada)
;;; arch-tag: 880ba90b-f6f5-4131-bc1d-930705b78416
diff --git a/lisp/language/knd-util.el b/lisp/language/knd-util.el
index dbdab4ead36..38610c3989c 100644
--- a/lisp/language/knd-util.el
+++ b/lisp/language/knd-util.el
@@ -113,21 +113,18 @@
dummy)
(function (lambda (x y) (> (length x) (length y))))))))
-(defun kannada-composition-function (from to pattern &optional string)
- "Compose Kannada characters in REGION, or STRING if specified.
-Assume that the REGION or STRING must fully match the composable
-PATTERN regexp."
- (if string (kannada-compose-syllable-string string)
- (kannada-compose-syllable-region from to))
- (- to from))
-
-;; Register a function to compose Kannada characters.
-(mapc
- (function (lambda (ucs)
- (aset composition-function-table (decode-char 'ucs ucs)
- (list (cons kannada-composable-pattern
- 'kannada-composition-function)))))
- (kannada-range #x0c80 #x0cff))
+;;;###autoload
+(defun kannada-composition-function (pos &optional string)
+ "Compose Kannada characters after the position POS.
+If STRING is not nil, it is a string, and POS is an index to the string.
+In this case, compose characters after POS of the string."
+ (if string
+ ;; Not yet implemented.
+ nil
+ (goto-char pos)
+ (if (looking-at kannada-composable-pattern)
+ (prog1 (match-end 0)
+ (kannada-compose-syllable-region pos (match-end 0))))))
;; Notes on conversion steps.
@@ -298,8 +295,8 @@ Default value contains only the basic rules.")
(defun knd-charseq (from &optional to)
(if (null to) (setq to from))
- (mapcar (function (lambda (x) (indian-glyph-char x 'kannada)))
- (kannada-range from to)))
+ (number-sequence (decode-char 'kannada-cdac from)
+ (decode-char 'kannada-cdac to)))
(defvar knd-glyph-cv
(append
diff --git a/lisp/language/korean.el b/lisp/language/korean.el
index 3e04c13b7d0..5a2ff9fdb19 100644
--- a/lisp/language/korean.el
+++ b/lisp/language/korean.el
@@ -6,6 +6,9 @@
;; 2005, 2006
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
+;; Copyright (C) 2003
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H13PRO009
;; Keywords: multilingual, Korean
@@ -32,26 +35,28 @@
;;; Code:
-(make-coding-system
- 'korean-iso-8bit 2 ?K
- "ISO 2022 based EUC encoding for Korean KSC5601 (MIME:EUC-KR)."
- '(ascii korean-ksc5601 nil nil
- nil ascii-eol ascii-cntl)
- '((safe-charsets ascii korean-ksc5601)
- (mime-charset . euc-kr)))
+(define-coding-system 'korean-iso-8bit
+ "ISO 2022 based EUC encoding for Korean KSC5601 (MIME:EUC-KR)."
+ :coding-type 'iso-2022
+ :mnemonic ?K
+ :designation [ascii korean-ksc5601 nil nil]
+ :charset-list '(ascii korean-ksc5601)
+ :mime-charset 'euc-kr)
(define-coding-system-alias 'euc-kr 'korean-iso-8bit)
(define-coding-system-alias 'euc-korea 'korean-iso-8bit)
(define-coding-system-alias 'cp949 'korean-iso-8bit)
-(make-coding-system
- 'iso-2022-kr 2 ?k
- "ISO 2022 based 7-bit encoding for Korean KSC5601 (MIME:ISO-2022-KR)."
- '(ascii (nil korean-ksc5601) nil nil
- nil ascii-eol ascii-cntl seven locking-shift nil nil nil nil nil
- designation-bol)
- '((safe-charsets ascii korean-ksc5601)
- (mime-charset . iso-2022-kr)))
+(define-coding-system 'iso-2022-kr
+ "ISO 2022 based 7-bit encoding for Korean KSC5601 (MIME:ISO-2022-KR)."
+ :coding-type 'iso-2022
+ :mnemonic ?k
+ :designation [ascii (nil korean-ksc5601) nil nil]
+ :flags '(ascii-at-eol ascii-at-cntl 7-bit designation locking-shift
+ designation-bol)
+ :charset-list '(ascii korean-ksc5601)
+ :mime-charset 'iso-2022-kr
+ :suitable-for-keyboard t)
(define-coding-system-alias 'korean-iso-7bit-lock 'iso-2022-kr)
diff --git a/lisp/language/lao-util.el b/lisp/language/lao-util.el
index 60f15670525..dcbdf7eb4aa 100644
--- a/lisp/language/lao-util.el
+++ b/lisp/language/lao-util.el
@@ -5,8 +5,11 @@
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
+;; Copyright (C) 2003
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H13PRO009
-;; Keywords: multilingual, Lao
+;; Keywords: multilingual, Lao, i18n
;; This file is part of GNU Emacs.
@@ -130,73 +133,7 @@
(?(1{(B invalid nil)
(?(1|(B consonant "LETTER NHOR NHUU" "MOUSE")
(?(1}(B consonant "LETTER MHOR MHAR" "DOG")
- (?(1~(B invalid nil)
- ;; Unicode equivalents
- (?$,1D!(B consonant "LETTER KOR KAI'" "CHICKEN")
- (?$,1D"(B consonant "LETTER KHOR KHAI'" "EGG")
- (?$,1D$(B consonant "LETTER QHOR QHWARGN" "BUFFALO")
- (?$,1D'(B consonant "LETTER NGOR NGUU" "SNAKE")
- (?$,1D((B consonant "LETTER JOR JUA" "BUDDHIST NOVICE")
- (?$,1D*(B consonant "LETTER XOR X\"ARNG" "ELEPHANT")
- (?$,1D-(B consonant "LETTER YOR YUNG" "MOSQUITO")
- (?$,1D4(B consonant "LETTER DOR DANG" "NOSE")
- (?$,1D5(B consonant "LETTER TOR TAR" "EYE")
- (?$,1D6(B consonant "LETTER THOR THUNG" "TO ASK,QUESTION")
- (?$,1D7(B consonant "LETTER DHOR DHARM" "FLAG")
- (?$,1D9(B consonant "LETTER NOR NOK" "BIRD")
- (?$,1D:(B consonant "LETTER BOR BED" "FISHHOOK")
- (?$,1D;(B consonant "LETTER POR PAR" "FISH")
- (?$,1D<(B consonant "LETTER HPOR HPER\"" "BEE")
- (?$,1D=(B consonant "LETTER FHOR FHAR" "WALL")
- (?$,1D>(B consonant "LETTER PHOR PHUU" "MOUNTAIN")
- (?$,1D?(B consonant "LETTER FOR FAI" "FIRE")
- (?$,1DA(B consonant "LETTER MOR MAR\"" "HORSE")
- (?$,1DB(B consonant "LETTER GNOR GNAR" "MEDICINE")
- (?$,1DC(B consonant "LETTER ROR ROD" "CAR")
- (?$,1DE(B consonant "LETTER LOR LIING" "MONKEY")
- (?$,1DG(B consonant "LETTER WOR WII" "HAND FAN")
- (?$,1DJ(B consonant "LETTER SOR SEA" "TIGER")
- (?$,1DK(B consonant "LETTER HHOR HHAI" "JAR")
- (?$,1DM(B consonant "LETTER OR OOW" "TAKE")
- (?$,1DN(B consonant "LETTER HOR HEA" "BOAT")
- (?$,1DO(B special "ELLIPSIS")
- (?$,1DP(B vowel-base "VOWEL SIGN SARA A")
- (?$,1DQ(B vowel-upper "VOWEL SIGN MAI KAN")
- (?$,1DR(B vowel-base "VOWEL SIGN SARA AR")
- (?$,1DS(B vowel-base "VOWEL SIGN SARA AM")
- (?$,1DT(B vowel-upper "VOWEL SIGN SARA I")
- (?$,1DU(B vowel-upper "VOWEL SIGN SARA II")
- (?$,1DV(B vowel-upper "VOWEL SIGN SARA EU")
- (?$,1DW(B vowel-upper "VOWEL SIGN SARA UR")
- (?$,1DX(B vowel-lower "VOWEL SIGN SARA U")
- (?$,1DY(B vowel-lower "VOWEL SIGN SARA UU")
- (?$,1D[(B vowel-upper "VOWEL SIGN MAI KONG")
- (?$,1D\(B semivowel-lower "SEMIVOWEL SIGN LO")
- (?$,1D](B vowel-base "SEMIVOWEL SIGN SARA IA")
- (?$,1D`(B vowel-base "VOWEL SIGN SARA EE")
- (?$,1Da(B vowel-base "VOWEL SIGN SARA AA")
- (?$,1Db(B vowel-base "VOWEL SIGN SARA OO")
- (?$,1Dc(B vowel-base "VOWEL SIGN SARA EI MAI MUAN\"")
- (?$,1Dd(B vowel-base "VOWEL SIGN SARA AI MAI MAY")
- (?$,1Df(B special "KO LA (REPETITION)")
- (?$,1Dh(B tone "TONE MAI EK")
- (?$,1Di(B tone "TONE MAI THO")
- (?$,1Dj(B tone "TONE MAI TI")
- (?$,1Dk(B tone "TONE MAI JADTAWAR")
- (?$,1Dl(B tone "CANCELLATION MARK")
- (?$,1Dm(B vowel-upper "VOWEL SIGN SARA OR")
- (?$,1Dp(B special "DIGIT ZERO")
- (?$,1Dq(B special "DIGIT ONE")
- (?$,1Dr(B special "DIGIT TWO")
- (?$,1Ds(B special "DIGIT THREE")
- (?$,1Dt(B special "DIGIT FOUR")
- (?$,1Du(B special "DIGIT FIVE")
- (?$,1Dv(B special "DIGIT SIX")
- (?$,1Dw(B special "DIGIT SEVEN")
- (?$,1Dx(B special "DIGIT EIGHT")
- (?$,1Dy(B special "DIGIT NINE")
- (?$,1D|(B consonant "LETTER NHOR NHUU" "MOUSE")
- (?$,1D}(B consonant "LETTER MHOR MHAR" "DOG")))
+ (?(1~(B invalid nil)))
elm)
(while l
(setq elm (car l) l (cdr l))
@@ -221,10 +158,10 @@
;; CV -> C, CT -> C, CVT -> C, Cv -> C, CvT -> C
;; v v
;; T
-;; V T V T
-;; CsV -> C, CsT -> C, CsVT -> C, Csv -> C, CvT -> C
-;; s s s s s
-;; v v
+;; V T V T
+;; CsV -> C, CsT -> C, CsVT -> C, Csv -> C, CsvT -> C
+;; s s s s s
+;; v v
;; where C: consonant, V: vowel upper, v: vowel lower,
@@ -424,37 +361,7 @@
("(1d(B" (?(1d(B 0))
("(1c(B" (?(1c(B 0))
("(1`[R(B" (?(1`(B 0 ?(1[(B ?(1R(B))
- ("(1S(B" (0 ?(1S(B))
-
- ;; Unicode equivalents
- ("$,1DP(B" (0 ?$,1DP(B) (0 ?$,1DQ(B))
- ("$,1DR(B" (0 ?$,1DR(B))
- ("$,1DT(B" (0 ?$,1DU(B))
- ("$,1DU(B" (0 ?$,1DU(B))
- ("$,1DV(B" (0 ?$,1DV(B))
- ("$,1DW(B" (0 ?$,1DW(B))
- ("$,1DX(B" (0 ?$,1DX(B))
- ("$,1DY(B" (0 ?$,1DY(B))
- ("$,1D`DP(B" (?$,1D`(B 0 ?$,1DP(B) (?$,1D`(B 0 ?$,1DQ(B))
- ("$,1D`(B" (?$,1D`(B 0))
- ("$,1DaDP(B" (?$,1Da(B 0 ?$,1DP(B) (?$,1Da(B 0 ?$,1DQ(B))
- ("$,1Da(B" (?$,1Da(B 0))
- ("$,1DbDP(B" (?$,1Db(B 0 ?$,1DP(B) (0 ?$,1D[(B) (?$,1D-(B ?$,1Db(B 0 ?$,1DQ(B) (?$,1DG(B ?$,1Db(B 0 ?$,1DQ(B))
- ("$,1Db(B" (?$,1Db(B 0))
- ("$,1D`DRDP(B" (?$,1D`(B 0 ?$,1DR(B ?$,1DP(B) (0 ?$,1DQ(B ?$,1DM(B))
- ("$,1Dm(B" (0 ?$,1Dm(B) (0 ?$,1DM(B))
- ("$,1D`DT(B" (?$,1D`(B 0 ?$,1DT(B))
- ("$,1D`DU(B" (?$,1D`(B 0 ?$,1DU(B))
- ("$,1D[DGDP(B" (0 ?$,1D[(B ?$,1DG(B ?$,1DP(B) (0 ?$,1DQ(B ?$,1DG(B))
- ("$,1D[DG(B" (0 ?$,1D[(B ?$,1DG(B) (0 ?$,1DG(B))
- ("$,1D`DQD]DP(B" (?$,1D`(B 0 ?$,1DQ(B ?$,1D](B ?$,1DP(B) (0 ?$,1DQ(B ?$,1D](B))
- ("$,1D`DQD](B" (?$,1D`(B 0 ?$,1DQ(B ?$,1D](B) (0 ?$,1D](B))
- ("$,1D`DVDM(B" (?$,1D`(B 0 ?$,1DV(B ?$,1DM(B))
- ("$,1D`DWDM(B" (?$,1D`(B 0 ?$,1DW(B ?$,1DM(B))
- ("$,1Dd(B" (?$,1Dd(B 0))
- ("$,1Dc(B" (?$,1Dc(B 0))
- ("$,1D`D[DR(B" (?$,1D`(B 0 ?$,1D[(B ?$,1DR(B))
- ("$,1DS(B" (0 ?$,1DS(B)))
+ ("(1S(B" (0 ?(1S(B)))
"Alist of Lao vowel string vs the corresponding re-ordering rule.
Each element has this form:
(VOWEL NO-MAA-SAKOD-RULE WITH-MAA-SAKOD-RULE (MAA-SAKOD-0 RULE-0) ...)
@@ -585,24 +492,20 @@ syllable. In that case, FROM and TO are indexes to STR."
lao-str)))
;;;###autoload
-(defun lao-post-read-conversion (len)
- (lao-compose-region (point) (+ (point) len))
- len)
-
-;;;###autoload
-(defun lao-composition-function (from to pattern &optional string)
- "Compose Lao text in the region FROM and TO.
-The text matches the regular expression PATTERN.
-Optional 4th argument STRING, if non-nil, is a string containing text
-to compose.
-
-The return value is number of composed characters."
- (if (< (1+ from) to)
- (progn
- (if string
- (compose-string string from to)
- (compose-region from to))
- (- to from))))
+(defun lao-composition-function (pos &optional string)
+ (setq pos (1- pos))
+ (with-category-table lao-category-table
+ (if string
+ (if (and (>= pos 0)
+ (eq (string-match lao-composition-pattern string pos) pos))
+ (prog1 (match-end 0)
+ (compose-string string pos (match-end 0))))
+ (if (>= pos (point-min))
+ (save-excursion
+ (goto-char pos)
+ (if (looking-at lao-composition-pattern)
+ (prog1 (match-end 0)
+ (compose-region pos (match-end 0)))))))))
;;;###autoload
(defun lao-compose-region (from to)
diff --git a/lisp/language/lao.el b/lisp/language/lao.el
index b55c731801d..ed290d988ef 100644
--- a/lisp/language/lao.el
+++ b/lisp/language/lao.el
@@ -4,6 +4,9 @@
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
+;; Copyright (C) 2003
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H13PRO009
;; Keywords: multilingual, Lao
@@ -28,41 +31,26 @@
;;; Code:
-(make-coding-system
- 'lao 2 ?L
- "8-bit encoding for ASCII (MSB=0) and LAO (MSB=1)."
- '(ascii lao nil nil
- nil nil nil nil nil nil nil nil nil nil nil t)
- '((safe-charsets ascii lao)
- (post-read-conversion . lao-post-read-conversion)))
+(define-coding-system 'lao
+ "8-bit encoding for ASCII (MSB=0) and LAO (MSB=1)."
+ :coding-type 'charset
+ :mnemonic ?L
+ :charset-list '(lao))
(set-language-info-alist
"Lao" '((charset lao)
(coding-system lao)
(coding-priority lao)
(input-method . "lao")
- (nonascii-translation . lao)
(unibyte-display . lao)
(features lao-util)
(documentation . t)))
-(aset use-default-ascent ?(1;(B t)
-(aset use-default-ascent ?$,1D;(B t)
-(aset use-default-ascent ?(1=(B t)
-(aset use-default-ascent ?$,1D=(B t)
-(aset use-default-ascent ?(1?(B t)
-(aset use-default-ascent ?$,1D?(B t)
-(aset use-default-ascent ?(1B(B t)
-(aset use-default-ascent ?$,1DB(B t)
-(aset ignore-relative-composition ?(1\(B t)
-(aset ignore-relative-composition ?$,1D\(B t)
-
-;; Register a function to compose Lao characters.
-(let ((patterns '(("\\c0\\c9?\\(\\(\\c2\\|\\c3\\)\\c4?\\|\\c4\\)?"
- . lao-composition-function))))
- (aset composition-function-table (make-char 'lao) patterns)
- (dotimes (i (1+ (- #xeff #xe80)))
- (aset composition-function-table (decode-char 'ucs (+ i #xe80)) patterns)))
+;; For automatic composition.
+(let ((chars "(1QTUVWXY[\hijklm(B"))
+ (dotimes (i (length chars))
+ (aset composition-function-table (aref chars i)
+ 'lao-composition-function)))
(provide 'lao)
diff --git a/lisp/language/malayalam.el b/lisp/language/malayalam.el
index ea264a87e64..bab94a2a2d8 100644
--- a/lisp/language/malayalam.el
+++ b/lisp/language/malayalam.el
@@ -41,6 +41,11 @@
South Indian language Malayalam is supported in this language environment."))
'("Indian"))
+;; For automatic composition.
+(set-char-table-range composition-function-table '(#x0d00 . #x0d7f)
+ 'malayalam-composition-function)
+
+
(provide 'malayalam)
;;; arch-tag: 5f500e53-1e4f-4bb2-aa93-ad8736f0349f
diff --git a/lisp/language/misc-lang.el b/lisp/language/misc-lang.el
index d7bc6f1b18b..ce643248242 100644
--- a/lisp/language/misc-lang.el
+++ b/lisp/language/misc-lang.el
@@ -43,6 +43,16 @@
IPA is International Phonetic Alphabet for English, French, German
and Italian.")))
+;; This is for Arabic. But, as we still don't have Arabic language
+;; support, we at least define a coding system here.
+
+(define-coding-system 'iso-8859-6
+ "ISO-8859-6 based encoding (MIME:ISO-8859-6)."
+ :coding-type 'charset
+ :mnemonic ?6
+ :charset-list '(iso-8859-6)
+ :mime-charset 'iso-8859-6)
+
(provide 'misc-lang)
;;; arch-tag: 6953585c-1a1a-4c09-be82-a2518afb6074
diff --git a/lisp/language/mlm-util.el b/lisp/language/mlm-util.el
index e20d64cd293..4d40f0dcb42 100644
--- a/lisp/language/mlm-util.el
+++ b/lisp/language/mlm-util.el
@@ -101,21 +101,17 @@
;;;###autoload
-(defun malayalam-composition-function (from to pattern &optional string)
- "Compose Malayalam characters in REGION, or STRING if specified.
-Assume that the REGION or STRING must fully match the composable
-PATTERN regexp."
- (if string (malayalam-compose-syllable-string string)
- (malayalam-compose-syllable-region from to))
- (- to from))
-
-;; Register a function to compose Malayalam characters.
-(mapc
- (function (lambda (ucs)
- (aset composition-function-table (decode-char 'ucs ucs)
- (list (cons malayalam-composable-pattern
- 'malayalam-composition-function)))))
- (nconc '(#x0d02 #x0d03) (malayalam-range #x0d05 #x0d39)))
+(defun malayalam-composition-function (pos &optional string)
+ "Compose Malayalam characters after the position POS.
+If STRING is not nil, it is a string, and POS is an index to the string.
+In this case, compose characters after POS of the string."
+ (if string
+ ;; Not yet implemented.
+ nil
+ (goto-char pos)
+ (if (looking-at malayalam-composable-pattern)
+ (prog1 (match-end 0)
+ (malayalam-compose-syllable-region pos (match-end 0))))))
;; Notes on conversion steps.
@@ -380,10 +376,16 @@ PATTERN regexp."
(narrow-to-region from to)
(goto-char (point-min))
;; char-glyph-conversion
- (while (re-search-forward mlm-char-glyph-regexp nil t)
- (setq match-str (match-string 0))
- (setq glyph-str
- (concat glyph-str (gethash match-str mlm-char-glyph-hash))))
+ (while (not (eobp))
+ (if (looking-at mlm-char-glyph-regexp)
+ (progn
+ (setq match-str (match-string 0)
+ glyph-str
+ (concat glyph-str
+ (gethash match-str mlm-char-glyph-hash)))
+ (goto-char (match-end 0)))
+ (setq glyph-str (concat glyph-str (string (following-char))))
+ (forward-char 1)))
(when (string-match mlm-glyph-reorder-key-glyphs glyph-str)
;; glyph reordering
(setq glyph-reorder-regexps mlm-glyph-reordering-regexp-list)
diff --git a/lisp/language/romanian.el b/lisp/language/romanian.el
index 50f0f4e7e82..79f8e7d87b8 100644
--- a/lisp/language/romanian.el
+++ b/lisp/language/romanian.el
@@ -4,7 +4,7 @@
;; Free Software Foundation.
;; Author: Dan Nicolaescu <done@ece.arizona.edu>
-;; Keywords: multilingual, Romanian
+;; Keywords: multilingual, Romanian, i18n
;; This file is part of GNU Emacs.
@@ -25,23 +25,33 @@
;;; Commentary:
-;; Romanian ISO 8859-2 environment.
+;; Romanian ISO 8859-2 environment plus 8859-16 coding system.
;;; Code:
(set-language-info-alist
- "Romanian" '((charset . (ascii latin-iso8859-2))
- (coding-system . (iso-8859-2))
- (coding-priority . (iso-8859-2))
- (nonascii-translation . latin-iso8859-2)
+ "Romanian" '((charset iso-8859-2)
+ (coding-system iso-8859-2 iso-latin-10)
+ (coding-priority iso-8859-2)
+ (nonascii-translation . iso-8859-2)
(input-method . "latin-2-postfix")
- (unibyte-syntax . "latin-2")
(unibyte-display . iso-8859-2)
(tutorial . "TUTORIAL.ro")
(sample-text . "Bunã ziua, bine aþi venit!")
- (documentation . t))
+ (documentation . "Rmoanian environment using Latin-2 encoding.
+An environment for generic Latin-10 encoding is also available."))
'("European"))
+(define-coding-system 'iso-latin-10
+ "ISO 2022 based 8-bit encoding for Latin-10."
+ :coding-type 'charset
+ :mnemonic ?*
+ :charset-list '(iso-8859-16)
+ :mime-charset 'iso-8859-16)
+
+(define-coding-system-alias 'iso-8859-16 'iso-latin-10)
+(define-coding-system-alias 'latin-10 'iso-latin-10)
+
(provide 'romanian)
;;; arch-tag: a0bf93ee-2f02-4678-a477-c08acc35366b
diff --git a/lisp/language/slovak.el b/lisp/language/slovak.el
index 27982c3ee16..3fe6fc0acb0 100644
--- a/lisp/language/slovak.el
+++ b/lisp/language/slovak.el
@@ -35,9 +35,8 @@
"Slovak" '((charset . (ascii latin-iso8859-2))
(coding-system . (iso-8859-2))
(coding-priority . (iso-8859-2))
- (nonascii-translation . latin-iso8859-2)
+ (nonascii-translation . iso-8859-2)
(input-method . "slovak")
- (unibyte-syntax . "latin-2")
(unibyte-display . iso-8859-2)
(tutorial . "TUTORIAL.sk")
(sample-text . "Prajeme V,Ba(Bm pr,Bm(Bjemn,B}(B de,Br(B!")
diff --git a/lisp/language/tamil.el b/lisp/language/tamil.el
index c1456f2a556..9be6490fe69 100644
--- a/lisp/language/tamil.el
+++ b/lisp/language/tamil.el
@@ -38,6 +38,9 @@
South Indian Language Tamil supported in this language environment."))
'("Indian"))
+;; For automatic composition.
+(set-char-table-range composition-function-table '(#x0b80 . #x0bff)
+ 'tamil-composition-function)
(provide 'tamil)
;;; arch-tag: 2201ac78-7d1e-4674-9bcb-9923c7a2bd9c
diff --git a/lisp/language/thai-util.el b/lisp/language/thai-util.el
index d91cc56116e..8dcfca2c3db 100644
--- a/lisp/language/thai-util.el
+++ b/lisp/language/thai-util.el
@@ -3,11 +3,11 @@
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006
;; National Institute of Advanced Industrial Science and Technology (AIST)
-;; Registration Number H14PRO021
+;; Registration Number H13PRO009
;; Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006
;; Free Software Foundation, Inc.
-;; Keywords: mule, multilingual, thai
+;; Keywords: mule, multilingual, Thai, i18n
;; This file is part of GNU Emacs.
@@ -58,17 +58,6 @@
"\\cc\\(\\cu\\|\\cI\\cU\\|\\cv\\ct?\\)\\|\\cv\\ct\\|\\cI\\cU"
"Regular expression matching a Thai composite sequence.")
-(defun thai-self-insert-command (&optional n)
- "Insert the Thai character you type.
-The character will be composed with the surrounding Thai character
-if necessary."
- (interactive "*p")
- (let ((pos (point))
- category-set ch)
- (self-insert-command n)
- (or thai-auto-composition-mode
- (thai-auto-composition (1- (point)) (point) 0))))
-
(let ((l '((?,T!(B consonant "LETTER KO KAI") ; 0xA1
(?,T"(B consonant "LETTER KHO KHAI") ; 0xA2
(?,T#(B consonant "LETTER KHO KHUAT") ; 0xA3
@@ -163,95 +152,6 @@ if necessary."
(?,T|(B invalid nil) ; 0xFC
(?,T}(B invalid nil) ; 0xFD
(?,T~(B invalid nil) ; 0xFE
-
- ;; Unicode equivalents
- (?$,1Ba(B consonant "LETTER KO KAI")
- (?$,1Bb(B consonant "LETTER KHO KHAI")
- (?$,1Bc(B consonant "LETTER KHO KHUAT")
- (?$,1Bd(B consonant "LETTER KHO KHWAI")
- (?$,1Be(B consonant "LETTER KHO KHON")
- (?$,1Bf(B consonant "LETTER KHO RAKHANG")
- (?$,1Bg(B consonant "LETTER NGO NGU")
- (?$,1Bh(B consonant "LETTER CHO CHAN")
- (?$,1Bi(B consonant "LETTER CHO CHING")
- (?$,1Bj(B consonant "LETTER CHO CHANG")
- (?$,1Bk(B consonant "LETTER SO SO")
- (?$,1Bl(B consonant "LETTER CHO CHOE")
- (?$,1Bm(B consonant "LETTER YO YING")
- (?$,1Bn(B consonant "LETTER DO CHADA")
- (?$,1Bo(B consonant "LETTER TO PATAK")
- (?$,1Bp(B consonant "LETTER THO THAN")
- (?$,1Bq(B consonant "LETTER THO NANGMONTHO")
- (?$,1Br(B consonant "LETTER THO PHUTHAO")
- (?$,1Bs(B consonant "LETTER NO NEN")
- (?$,1Bt(B consonant "LETTER DO DEK")
- (?$,1Bu(B consonant "LETTER TO TAO")
- (?$,1Bv(B consonant "LETTER THO THUNG")
- (?$,1Bw(B consonant "LETTER THO THAHAN")
- (?$,1Bx(B consonant "LETTER THO THONG")
- (?$,1By(B consonant "LETTER NO NU")
- (?$,1Bz(B consonant "LETTER BO BAIMAI")
- (?$,1B{(B consonant "LETTER PO PLA")
- (?$,1B|(B consonant "LETTER PHO PHUNG")
- (?$,1B}(B consonant "LETTER FO FA")
- (?$,1B~(B consonant "LETTER PHO PHAN")
- (?$,1B(B consonant "LETTER FO FAN")
- (?$,1C (B consonant "LETTER PHO SAMPHAO")
- (?$,1C!(B consonant "LETTER MO MA")
- (?$,1C"(B consonant "LETTER YO YAK")
- (?$,1C#(B consonant "LETTER RO RUA")
- (?$,1C$(B vowel-base "LETTER RU (Pali vowel letter)")
- (?$,1C%(B consonant "LETTER LO LING")
- (?$,1C&(B vowel-base "LETTER LU (Pali vowel letter)")
- (?$,1C'(B consonant "LETTER WO WAEN")
- (?$,1C((B consonant "LETTER SO SALA")
- (?$,1C)(B consonant "LETTER SO RUSI")
- (?$,1C*(B consonant "LETTER SO SUA")
- (?$,1C+(B consonant "LETTER HO HIP")
- (?$,1C,(B consonant "LETTER LO CHULA")
- (?$,1C-(B consonant "LETTER O ANG")
- (?$,1C.(B consonant "LETTER HO NOK HUK")
- (?$,1C/(B special "PAI YAN NOI (abbreviation)")
- (?$,1C0(B vowel-base "VOWEL SIGN SARA A")
- (?$,1C1(B vowel-upper "VOWEL SIGN MAI HAN-AKAT N/S-T")
- (?$,1C2(B vowel-base "VOWEL SIGN SARA AA")
- (?$,1C3(B vowel-base "VOWEL SIGN SARA AM")
- (?$,1C4(B vowel-upper "VOWEL SIGN SARA I N/S-T")
- (?$,1C5(B vowel-upper "VOWEL SIGN SARA II N/S-T")
- (?$,1C6(B vowel-upper "VOWEL SIGN SARA UE N/S-T")
- (?$,1C7(B vowel-upper "VOWEL SIGN SARA UEE N/S-T")
- (?$,1C8(B vowel-lower "VOWEL SIGN SARA U N/S-B")
- (?$,1C9(B vowel-lower "VOWEL SIGN SARA UU N/S-B")
- (?$,1C:(B vowel-lower "VOWEL SIGN PHINTHU N/S-B (Pali virama)")
- (?$,1C?(B special "BAHT SIGN (currency symbol)")
- (?$,1C@(B vowel-base "VOWEL SIGN SARA E")
- (?$,1CA(B vowel-base "VOWEL SIGN SARA AE")
- (?$,1CB(B vowel-base "VOWEL SIGN SARA O")
- (?$,1CC(B vowel-base "VOWEL SIGN SARA MAI MUAN")
- (?$,1CD(B vowel-base "VOWEL SIGN SARA MAI MALAI")
- (?$,1CE(B vowel-base "LAK KHANG YAO")
- (?$,1CF(B special "MAI YAMOK (repetion)")
- (?$,1CG(B sign-upper "VOWEL SIGN MAI TAI KHU N/S-T")
- (?$,1CH(B tone "TONE MAI EK N/S-T")
- (?$,1CI(B tone "TONE MAI THO N/S-T")
- (?$,1CJ(B tone "TONE MAI TRI N/S-T")
- (?$,1CK(B tone "TONE MAI CHATTAWA N/S-T")
- (?$,1CL(B sign-upper "THANTHAKHAT N/S-T (cancellation mark)")
- (?$,1CM(B sign-upper "NIKKHAHIT N/S-T (final nasal)")
- (?$,1CN(B sign-upper "YAMAKKAN N/S-T")
- (?$,1CO(B special "FONRMAN")
- (?$,1CP(B special "DIGIT ZERO")
- (?$,1CQ(B special "DIGIT ONE")
- (?$,1CR(B special "DIGIT TWO")
- (?$,1CS(B special "DIGIT THREE")
- (?$,1CT(B special "DIGIT FOUR")
- (?$,1CU(B special "DIGIT FIVE")
- (?$,1CV(B special "DIGIT SIX")
- (?$,1CW(B special "DIGIT SEVEN")
- (?$,1CX(B special "DIGIT EIGHT")
- (?$,1CY(B special "DIGIT NINE")
- (?$,1CZ(B special "ANGKHANKHU (ellipsis)")
- (?$,1C[(B special "KHOMUT (beginning of religious texts)")
))
elm)
(while l
@@ -260,24 +160,20 @@ if necessary."
(ptype (nth 1 elm)))
(put-char-code-property char 'phonetic-type ptype)
(cond ((eq ptype 'consonant)
- (modify-category-entry char ?c thai-category-table)
- (global-set-key (vector char) 'thai-self-insert-command))
+ (modify-category-entry char ?c thai-category-table))
((memq ptype '(vowel-upper vowel-lower))
(modify-category-entry char ?v thai-category-table)
- (if (or (= char ?,TT(B) (= char ?$,1C4(B))
+ (if (= char ?,TT(B)
;; Give category `I' to "SARA I".
- (modify-category-entry char ?I thai-category-table))
- (global-set-key (vector char) 'thai-self-insert-command))
+ (modify-category-entry char ?I thai-category-table)))
((eq ptype 'tone)
(modify-category-entry char ?t thai-category-table)
- (modify-category-entry char ?u thai-category-table)
- (global-set-key (vector char) 'thai-self-insert-command))
+ (modify-category-entry char ?u thai-category-table))
((eq ptype 'sign-upper)
(modify-category-entry char ?u thai-category-table)
- (if (or (= char ?,Tl(B) (= char ?$,1CL(B))
+ (if (= char ?,Tl(B)
;; Give category `U' to "THANTHAKHAT".
- (modify-category-entry char ?U thai-category-table))
- (global-set-key (vector char) 'thai-self-insert-command)))
+ (modify-category-entry char ?U thai-category-table))))
(put-char-code-property char 'name (nth 2 elm)))))
(defun thai-compose-syllable (beg end &optional category-set string)
@@ -333,57 +229,20 @@ positions (integers or markers) specifying the region."
(thai-compose-region (point-min) (point-max)))
;;;###autoload
-(defun thai-post-read-conversion (len)
- (thai-compose-region (point) (+ (point) len))
- len)
-
-;;;###autoload
-(defun thai-composition-function (from to pattern &optional string)
- "Compose Thai text in the region FROM and TO.
-The text matches the regular expression PATTERN.
-Optional 4th argument STRING, if non-nil, is a string containing text
-to compose.
-
-The return value is number of composed characters."
- (when (and (not thai-auto-composition-mode)
- (< (1+ from) to))
- (with-category-table thai-category-table
- (if string
- (if (eq (string-match thai-composition-pattern string from) from)
- (thai-compose-syllable from (match-end 0) nil string))
- (if (save-excursion
- (goto-char from)
- (and (looking-at thai-composition-pattern)
- (setq to (match-end 0))))
- (thai-compose-syllable from to))))))
-
-(defun thai-auto-composition (beg end len)
+(defun thai-composition-function (pos &optional string)
+ (setq pos (1- pos))
(with-category-table thai-category-table
- (let (category-set)
- (while (and (> beg (point-min))
- (setq category-set (char-category-set (char-after (1- beg))))
- (or (aref category-set ?v) (aref category-set ?u)))
- (setq beg (1- beg)))
- (if (and (> beg (point-min))
- (aref (char-category-set (char-after (1- beg))) ?c))
- (setq beg (1- beg)))
- (while (and (< end (point-max))
- (setq category-set (char-category-set (char-after end)))
- (or (aref category-set ?v) (aref category-set ?u)))
- (setq end (1+ end)))
- (if (< beg end)
- (thai-compose-region beg end)))))
-
-(put 'thai-auto-composition-mode 'permanent-local t)
-
-;;;###autoload
-(define-minor-mode thai-auto-composition-mode
- "Minor mode for automatically correct Thai character composition."
- :group 'mule
- (cond ((null thai-auto-composition-mode)
- (remove-hook 'after-change-functions 'thai-auto-composition))
- (t
- (add-hook 'after-change-functions 'thai-auto-composition))))
+ (if string
+ (if (and (>= pos 0)
+ (eq (string-match thai-composition-pattern string pos) pos))
+ (prog1 (match-end 0)
+ (thai-compose-syllable pos (match-end 0) nil string)))
+ (if (>= pos (point-min))
+ (progn
+ (goto-char pos)
+ (if (looking-at thai-composition-pattern)
+ (prog1 (match-end 0)
+ (thai-compose-syllable pos (match-end 0)))))))))
;; Thai-word-mode requires functions in the feature `thai-word'.
(require 'thai-word)
diff --git a/lisp/language/thai.el b/lisp/language/thai.el
index 65d5f7d1748..0c346c7594b 100644
--- a/lisp/language/thai.el
+++ b/lisp/language/thai.el
@@ -3,11 +3,14 @@
;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
;; 2005, 2006
;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H13PRO009
+;; Copyright (C) 2005
+;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
;; Copyright (C) 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
;; 2006 Free Software Foundation, Inc.
-;; Keywords: multilingual, Thai
+;; Keywords: multilingual, Thai, i18n
;; This file is part of GNU Emacs.
@@ -32,14 +35,11 @@
;;; Code:
-(make-coding-system
- 'thai-tis620 2 ?T
- "8-bit encoding for ASCII (MSB=0) and Thai TIS620 (MSB=1)."
- '(ascii thai-tis620 nil nil
- nil nil nil nil nil nil nil nil nil nil nil t)
- '((safe-charsets ascii thai-tis620)
- (mime-charset . tis-620)
- (post-read-conversion . thai-post-read-conversion)))
+(define-coding-system 'thai-tis620
+ "8-bit encoding for ASCII (MSB=0) and Thai TIS620 (MSB=1)."
+ :coding-type 'charset
+ :mnemonic ?T
+ :charset-list '(tis620-2533))
(define-coding-system-alias 'th-tis620 'thai-tis620)
(define-coding-system-alias 'tis620 'thai-tis620)
@@ -48,9 +48,9 @@
(set-language-info-alist
"Thai" '((tutorial . "TUTORIAL.th")
(charset thai-tis620)
- (coding-system thai-tis620)
+ (coding-system thai-tis620 iso-8859-11 cp874)
(coding-priority thai-tis620)
- (nonascii-translation . thai-tis620)
+ (nonascii-translation . tis620-2533)
(input-method . "thai-kesmanee")
(unibyte-display . thai-tis620)
(features thai-util)
@@ -58,16 +58,30 @@
(exit-function . exit-thai-language-environment-internal)
(sample-text
. (thai-compose-string
- (copy-sequence "Thai (,T@RIRd7B(B) ,TJ0GQ1J04U1$0CQ1:(B, ,TJ0GQ1J04U10$h1P(B")))
+ (copy-sequence "Thai (,T@RIRd7B(B) ,TJGQJ4U$CQ:(B, ,TJGQJ4U$hP(B")))
(documentation . t)))
-
-;; Register a function to compose Thai characters.
-(let ((patterns '(("\\c0?\\(\\c2\\|\\c3\\|\\c4\\)+"
- . thai-composition-function))))
- (aset composition-function-table (make-char 'thai-tis620) patterns)
- (dotimes (i (1+ (- #xe7f #xe00)))
- (aset composition-function-table (decode-char 'ucs (+ i #xe00)) patterns)))
+(define-coding-system 'cp874
+ "DOS codepage 874 (Thai)"
+ :coding-type 'charset
+ :mnemonic ?D
+ :charset-list '(cp874)
+ :mime-charset 'cp874)
+(define-coding-system-alias 'ibm874 'cp874)
+
+(define-coding-system 'iso-8859-11
+ "ISO/IEC 8859/11 (Latin/Thai)
+This is the same as `thai-tis620' with the addition of no-break-space."
+ :coding-type 'charset
+ :mnemonic ?*
+ :mime-charset 'iso-8859-11 ; not actually registered as of 2002-05-24
+ :charset-list '(iso-8859-11))
+
+;; For automatic composition.
+(let ((chars ",TQTUVWXYZghijklmn(B"))
+ (dotimes (i (length chars))
+ (aset composition-function-table (aref chars i)
+ 'thai-composition-function)))
(provide 'thai)
diff --git a/lisp/language/tibet-util.el b/lisp/language/tibet-util.el
index d2d1950dad9..012456da6e7 100644
--- a/lisp/language/tibet-util.el
+++ b/lisp/language/tibet-util.el
@@ -40,13 +40,13 @@
;;; Code:
(defconst tibetan-obsolete-glyphs
- `(("$(7!=(B" . "$(8!=(B") ; 2 col <-> 1 col
- ("$(7!?(B" . "$(8!?(B")
- ("$(7!@(B" . "$(8!@(B")
- ("$(7!A(B" . "$(8!A(B")
- ("$(7"`(B" . "$(8"`(B")
- ("$(7!;(B" . "$(8!;(B")
- ("$(7!D(B" . "$(8!D(B")
+ `(("$(7!=(B" . "$(7!=(B") ; 2 col <-> 1 col
+ ("$(7!?(B" . "$(7!?(B")
+ ("$(7!@(B" . "$(7!@(B")
+ ("$(7!A(B" . "$(7!A(B")
+ ("$(7"`(B" . "$(7"`(B")
+ ("$(7!;(B" . "$(7!;(B")
+ ("$(7!D(B" . "$(7!D(B")
;; Yes these are dirty. But ...
("$(7!>(B $(7!>(B" . ,(compose-string "$(7!>(B $(7!>(B" 0 3 [?$(7!>(B (Br . Bl) ? (Br . Bl) ?$(7!>(B]))
("$(7!4!5!5(B" . ,(compose-string
@@ -141,7 +141,7 @@ The returned string has no composition information."
;;;
;;; Here are examples of the words "bsgrubs" and "hfauM"
;;;
-;;; 4$(7"70"714%qx!"U0"G###C"U14"70"714"G0"G1(B 4$(7"Hx!"Rx!"Ur'"_0"H"R"U"_1(B
+;;; $(7"7"G###C"U"7"G(B $(7"H"R"U"_(B
;;;
;;; M
;;; b s b s h
@@ -167,7 +167,7 @@ The returned string has no composition information."
;; If 'a follows a consonant, turn it into the subjoined form.
;; * Disabled by Tomabechi 2000/06/09 *
;; Because in Unicode, $(7"A(B may follow directly a consonant without
- ;; any intervening vowel, as in 4$(7"90"914""0"""Q14"A0"A1!;(B=4$(7"90"91(B 4$(7""0""1(B 4$(7"A0"A1(B not 4$(7"90"91(B 4$(7""0""1(B $(7"Q(B 4$(7"A0"A1(B
+ ;; any intervening vowel, as in $(7"9"""Q"A!;(B=$(7"9(B $(7""(B $(7"A(B not $(7"9(B $(7""(B $(7"Q(B $(7"A(B
;;(if (and (= char ?$(7"A(B)
;; (aref (char-category-set (car last)) ?0))
;; (setq char ?$(7"R(B)) ;; modified for new font by Tomabechi 1999/12/10
@@ -189,7 +189,8 @@ The returned string has no composition information."
;; Compose lower vowel sign vertically under.
((aref (char-category-set char) ?3)
- (if (eq char ?$(7"Q(B) ;; `$(7"Q(B' should not visible when composed.
+ (if (or (eq char ?$(7"Q(B) ;; `$(7"Q(B' and `$,1FP(B' should not visible when composed.
+ (eq char #xF70))
(setq rule nil)
(setq rule stack-under)))
;; Transform ra-mgo (superscribed r) if followed by a subjoined
@@ -315,11 +316,17 @@ are decomposed into normal Tibetan character sequences."
new))
;;;###autoload
-(defun tibetan-composition-function (from to pattern &optional string)
+(defun tibetan-composition-function (pos &optional string)
+ (setq pos (1- pos))
(if string
- (tibetan-compose-string string)
- (tibetan-compose-region from to))
- (- to from))
+ ;; Not yet implemented.
+ nil
+ (if (>= pos (point-min))
+ (save-excursion
+ (goto-char pos)
+ (if (looking-at tibetan-composable-pattern)
+ (prog1 (match-end 0)
+ (tibetan-compose-region pos (match-end 0))))))))
;;;
;;; This variable is used to avoid repeated decomposition.
diff --git a/lisp/language/tibetan.el b/lisp/language/tibetan.el
index f4ebb391610..6256382d870 100644
--- a/lisp/language/tibetan.el
+++ b/lisp/language/tibetan.el
@@ -5,8 +5,11 @@
;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
+;; Copyright (C) 2003
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H13PRO009
-;; Keywords: multilingual, Tibetan
+;; Keywords: multilingual, Tibetan, i18n
;; This file is part of GNU Emacs.
@@ -85,14 +88,12 @@
;;;
-(make-coding-system
- 'tibetan-iso-8bit 2 ?Q
- "8-bit encoding for ASCII (MSB=0) and TIBETAN (MSB=1)."
- '(ascii tibetan nil nil
- nil nil)
- '((safe-charsets ascii tibetan)
- (post-read-conversion . tibetan-post-read-conversion)
- (pre-write-conversion . tibetan-pre-write-conversion)))
+(define-coding-system 'tibetan-iso-8bit
+ "8-bit encoding for ASCII (MSB=0) and TIBETAN (MSB=1)."
+ :coding-type 'iso-2022
+ :mnemonic ?Q
+ :designation [ascii tibetan nil nil]
+ :charset-list '(ascii tibetan))
(define-coding-system-alias 'tibetan 'tibetan-iso-8bit)
@@ -103,11 +104,7 @@
(input-method . "tibetan-wylie")
(features tibet-util)
(documentation . t)
- (sample-text
- . (tibetan-compose-string
- (copy-sequence
-"Tibetan (4$(7"7r'"]0"7"]14"20"21!;4%P0"G#!"Q14"20"21!;(B) $(7!4!5!5!>4"70"714$P0"!#C"Q1!;4"Er'"S0"E"S14"G0"G1!;4"70"714"2r'"[0"2"[1!;4"Dr'"[0"D"[14"#0"#14"G0"G1!>4"Ir'"]r'"_0"I"]"_1!;4"90"9"Q1!;4"/r'"S0"/"S1!;4"50"5"Q14#2x!#9r'"[0"2#9"[1!;4"Hx!"Rx!"Ur'"c0"H"A"U"c1!>(B")))))
-
+ (sample-text "Tibetan ($(7"7"]"2!;"G#!"Q"2!;(B) $(7!4!5!5!>"7"!#C"Q!;"E"S"G!;"7"2"[!;"D"["#"G!>"I"]"_!;"9"Q!;"/"S!;"5"Q"2#9"[!;"H"A"U"c!>(B")))
;; `$(7"A(B' is included in the pattern for subjoined consonants because we
;; treat it specially in tibetan-add-components.
@@ -118,13 +115,9 @@
;; $(7"A(B is removed from the class of subjoined. Tomabechi 2000/06/08
;; (for Unicode support)
(defconst tibetan-composable-pattern
- "[$(7"!(B-$(7"J"K(B][$(7#!(B-$(7#J#K#L#M(B]*[$(7"Q"R"S(B-$(7"^"a"b"e(B]*[$(7"_"c"d"g(B-$(7"l!I!e!g(B]*"
+ "[$(7"!(B-$(7"J"K(B][$(7#!(B-$(7#J#K#L#M(B]*[$,1FP$(7"Q"R"S(B-$(7"^"a"b"e(B]*[$(7"_"c"d"g(B-$(7"l!I!e!g(B]*"
"Regexp matching a composable sequence of Tibetan characters.")
-;; Register a function to compose Tibetan characters.
-(aset composition-function-table (make-char 'tibetan)
- (list (cons tibetan-composable-pattern 'tibetan-composition-function)))
-
;;;
;;; Definitions of conversion data.
;;;
@@ -611,6 +604,16 @@ This also matches some punctuation characters which need conversion.")
(defvar tibetan-decomposed nil)
(defvar tibetan-decomposed-temp nil)
+
+;; For automatic composition.
+(dolist (range '((?$(7#!(B . ?$(7#J(B) "$(7#K#L#M"Q"R(B" (?$(7"S(B . ?$(7"^(B) "$(7"a"b"e"_"c"d(B" (?$(7"g(B . ?$(7"l(B) "$(7!I!e!g(B"))
+ (if (stringp range)
+ (dotimes (i (length range))
+ (aset composition-function-table (aref range i)
+ 'tibetan-composition-function))
+ (set-char-table-range composition-function-table range
+ 'tibetan-composition-function)))
+
(provide 'tibetan)
;;; arch-tag: 8d37c8d7-f95d-450f-9ec2-819e61fc79a7
diff --git a/lisp/language/tml-util.el b/lisp/language/tml-util.el
index 0e6e95e59d1..b655d3c1944 100644
--- a/lisp/language/tml-util.el
+++ b/lisp/language/tml-util.el
@@ -102,23 +102,6 @@
(function (lambda (x y) (> (length x) (length y))))))))
-;;;###autoload
-(defun tamil-composition-function (from to pattern &optional string)
- "Compose Tamil characters in REGION, or STRING if specified.
-Assume that the REGION or STRING must fully match the composable
-PATTERN regexp."
- (if string (tamil-compose-syllable-string string)
- (tamil-compose-syllable-region from to))
- (- to from))
-
-;; Register a function to compose Tamil characters.
-(mapc
- (function (lambda (ucs)
- (aset composition-function-table (decode-char 'ucs ucs)
- (list (cons tamil-composable-pattern
- 'tamil-composition-function)))))
- (nconc '(#x0b82 #x0b83) (tamil-range #x0b85 #x0bb9)))
-
;; Notes on conversion steps.
;; 1. chars to glyphs
@@ -136,7 +119,7 @@ PATTERN regexp."
(defvar tml-char-glyph
'(;; various signs
- ;;("$,1<"(B" . "")
+ ("$,1<"(B" . "$,4)b(B") ;; not good
("$,1<#(B" . "$,4*G(B")
;; Independent Vowels
("$,1<%(B" . "$,4*<(B")
@@ -335,10 +318,18 @@ PATTERN regexp."
(narrow-to-region from to)
(goto-char (point-min))
;; char-glyph-conversion
- (while (re-search-forward tml-char-glyph-regexp nil t)
- (setq match-str (match-string 0))
- (setq glyph-str
- (concat glyph-str (gethash match-str tml-char-glyph-hash))))
+ (while (not (eobp))
+ (if (looking-at tml-char-glyph-regexp)
+ (progn
+ (setq match-str (match-string 0)
+ glyph-str
+ (concat glyph-str
+ (gethash match-str tml-char-glyph-hash)))
+ (goto-char (match-end 0)))
+ (setq glyph-str (concat glyph-str (string (following-char))))
+ (forward-char 1)))
+ (or glyph-str
+ (aset glyph-str 0 (following-char)))
;; glyph reordering
(when (string-match tml-glyph-reorder-key-glyphs glyph-str)
(if (string-match (car tml-glyph-reordering-regexp-list)
@@ -363,6 +354,19 @@ PATTERN regexp."
glyph-str))))
(compose-region from to glyph-str)))))
+;;;###autoload
+(defun tamil-composition-function (pos &optional string)
+ "Compose Tamil characters after the position POS.
+If STRING is not nil, it is a string, and POS is an index to the string.
+In this case, compose characters after POS of the string."
+ (if string
+ ;; Not yet implemented.
+ nil
+ (goto-char pos)
+ (if (looking-at tamil-composable-pattern)
+ (prog1 (match-end 0)
+ (tamil-compose-syllable-region pos (match-end 0))))))
+
(provide 'tml-util)
;;; arch-tag: 4d1c9737-e7b1-44cf-a040-4f64c50e773e
diff --git a/lisp/language/utf-8-lang.el b/lisp/language/utf-8-lang.el
index 894c0484c48..aae98bba251 100644
--- a/lisp/language/utf-8-lang.el
+++ b/lisp/language/utf-8-lang.el
@@ -28,14 +28,15 @@
;;; Code:
(set-language-info-alist
- "UTF-8" `((coding-system mule-utf-8)
- (coding-priority mule-utf-8)
- (setup-function
- . (lambda ()
- ;; Use Unicode font under Windows. Jason Rumney fecit.
- (if (and (fboundp 'w32-add-charset-info)
- (not (boundp 'w32-unicode-charset-defined)))
- (w32-add-charset-info "iso10646-1" 'w32-charset-ansi t))))
+ "UTF-8" `((coding-system utf-8)
+ (coding-priority utf-8)
+;; Presumably not relevant now.
+;; (setup-function
+;; . (lambda ()
+;; ;; Use Unicode font under Windows. Jason Rumney fecit.
+;; (if (and (fboundp 'w32-add-charset-info)
+;; (not (boundp 'w32-unicode-charset-defined)))
+;; (w32-add-charset-info "iso10646-1" 'w32-charset-ansi t))))
;; Is this appropriate?
;; (exit-function
;; . (lambda ()
@@ -46,8 +47,8 @@
;; w32-charset-info-alist)))))
(input-method . "rfc1345") ; maybe not the best choice
(documentation . "\
-This language environment is a generic one for a subset of the Unicode
-character set encoded in UTF-8."))
+This language environment is a generic one for the Unicode character set
+encoded in UTF-8."))
nil)
(provide 'utf-8-lang)
diff --git a/lisp/language/viet-util.el b/lisp/language/viet-util.el
index 0c4890cb9e4..17e6f576951 100644
--- a/lisp/language/viet-util.el
+++ b/lisp/language/viet-util.el
@@ -6,6 +6,9 @@
;; 2005, 2006
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
+;; Copyright (C) 2003
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H13PRO009
;; Keywords: mule, multilingual, Vietnamese
@@ -45,8 +48,7 @@
;;;###autoload
(defun viet-encode-viscii-char (char)
"Return VISCII character code of CHAR if appropriate."
- (aref (char-table-extra-slot viet-viscii-nonascii-translation-table 0)
- char))
+ (encode-char char 'viscii))
;; VIQR is a menmonic encoding specification for Vietnamese.
;; It represents diacritical marks by ASCII characters as follows:
diff --git a/lisp/language/vietnamese.el b/lisp/language/vietnamese.el
index 870dd474451..22141b6d0e3 100644
--- a/lisp/language/vietnamese.el
+++ b/lisp/language/vietnamese.el
@@ -6,8 +6,11 @@
;; 2005, 2006
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H14PRO021
+;; Copyright (C) 2003
+;; National Institute of Advanced Industrial Science and Technology (AIST)
+;; Registration Number H13PRO009
-;; Keywords: multilingual, Vietnamese
+;; Keywords: multilingual, Vietnamese, i18n
;; This file is part of GNU Emacs.
@@ -33,243 +36,25 @@
;;; Code:
-(defvar viet-viscii-decode-table
- [;; VISCII is a full 8-bit code.
- 0 1 ?,2F(B 3 4 ?,2G(B ?,2g(B 7 8 9 10 11 12 13 14 15
- 16 17 18 19 ?,2V(B 21 22 23 24 ?,2[(B 26 27 28 29 ?,2\(B 31
- 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
- 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
- 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
- 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
- 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
- 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
- ?,2U(B ?,2!(B ?,2"(B ?,2#(B ?,2$(B ?,2%(B ?,2&(B ?,2'(B ?,2((B ?,2)(B ?,2*(B ?,2+(B ?,2,(B ?,2-(B ?,2.(B ?,2/(B
- ?,20(B ?,21(B ?,22(B ?,25(B ?,2~(B ?,2>(B ?,26(B ?,27(B ?,28(B ?,2v(B ?,2w(B ?,2o(B ?,2|(B ?,2{(B ?,2x(B ?,2O(B
- ?,2u(B ?,1!(B ?,1"(B ?,1#(B ?,1$(B ?,1%(B ?,1&(B ?,1'(B ?,1((B ?,1)(B ?,1*(B ?,1+(B ?,1,(B ?,1-(B ?,1.(B ?,1/(B
- ?,10(B ?,11(B ?,12(B ?,2^(B ?,2=(B ?,15(B ?,16(B ?,17(B ?,18(B ?,2q(B ?,2Q(B ?,2W(B ?,2X(B ?,1=(B ?,1>(B ?,2_(B
- ?,2`(B ?,2a(B ?,2b(B ?,2c(B ?,2d(B ?,2e(B ?,1F(B ?,1G(B ?,2h(B ?,2i(B ?,2j(B ?,2k(B ?,2l(B ?,2m(B ?,2n(B ?,1O(B
- ?,2p(B ?,1Q(B ?,2r(B ?,2s(B ?,2t(B ?,1U(B ?,1V(B ?,1W(B ?,1X(B ?,2y(B ?,2z(B ?,1[(B ?,1\(B ?,2}(B ?,1^(B ?,1_(B
- ?,1`(B ?,1a(B ?,1b(B ?,1c(B ?,1d(B ?,1e(B ?,1f(B ?,1g(B ?,1h(B ?,1i(B ?,1j(B ?,1k(B ?,1l(B ?,1m(B ?,1n(B ?,1o(B
- ?,1p(B ?,1q(B ?,1r(B ?,1s(B ?,1t(B ?,1u(B ?,1v(B ?,1w(B ?,1x(B ?,1y(B ?,1z(B ?,1{(B ?,1|(B ?,1}(B ?,1~(B ?,2f(B ]
- "Vietnamese VISCII decoding table.")
-
-(let ((table (make-translation-table-from-vector viet-viscii-decode-table)))
- (define-translation-table 'viet-viscii-nonascii-translation-table table)
- (define-translation-table 'viet-viscii-encode-table
- (char-table-extra-slot table 0)))
-
-;;;
-;;; VSCII is a pre-version of TCVN-5712 and deprecated
-;;;
-(defvar viet-vscii-decode-table
- [;; VSCII is a full 8-bit code.
- 0 ?,2z(B ?,2x(B 3 ?,2W(B ?,2X(B ?,2f(B 7 8 9 10 11 12 13 14 15
- 16 ?,2Q(B ?,2_(B ?,2O(B ?,2V(B ?,2[(B ?,2}(B ?,2\(B 24 25 26 27 28 29 30 31
- 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
- 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
- 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
- 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
- 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
- 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
- ?,2`(B ?,2d(B ?,2c(B ?,2a(B ?,2U(B ?,2#(B ?,2'(B ?,2h(B ?,2k(B ?,2((B ?,2i(B ?,2)(B ?,2.(B ?,2l(B ?,2o(B ?,2n(B
- ?,2m(B ?,28(B ?,2r(B ?,2v(B ?,2u(B ?,2s(B ?,2w(B ?,25(B ?,26(B ?,27(B ?,2^(B ?,2>(B ?,2~(B ?,2y(B ?,2|(B ?,2{(B
- 160 ?,2e(B ?,2b(B ?,2j(B ?,2t(B ?,2=(B ?,2_(B ?,2p(B ?,1e(B ?,1b(B ?,1j(B ?,1t(B ?,1=(B ?,1y(B ?,1p(B ?,2"(B
- 192 193 194 195 196 ?,1`(B ?,1d(B ?,1c(B ?,1a(B ?,1U(B ?,2F(B ?,1"(B ?,1F(B ?,1G(B ?,1!(B ?,2G(B
- ?,2!(B ?,2%(B ?,2&(B ?,2g(B ?,2%(B ?,2+(B ?,1#(B ?,1%(B ?,1&(B ?,1g(B ?,1$(B ?,1'(B ?,1h(B ?,2,(B ?,1k(B ?,1((B
- ?,1i(B ?,1)(B ?,1+(B ?,1,(B ?,1-(B ?,1*(B ?,1.(B ?,1l(B ?,1o(B ?,2-(B ?,2*(B ?,20(B ?,1n(B ?,1m(B ?,18(B ?,1r(B
- ?,21(B ?,1v(B ?,1u(B ?,1s(B ?,1w(B ?,10(B ?,11(B ?,12(B ?,1/(B ?,15(B ?,16(B ?,17(B ?,1^(B ?,1>(B ?,1~(B ?,1y(B
- ?,22(B ?,1|(B ?,1{(B ?,1z(B ?,1x(B ?,1W(B ?,1X(B ?,1f(B ?,1Q(B ?,1q(B ?,1O(B ?,1V(B ?,1[(B ?,1}(B ?,1\(B ?,2/(B]
- "Vietnamese VSCII decoding table.")
-
-(let ((table (make-translation-table-from-vector viet-vscii-decode-table)))
- (define-translation-table 'viet-vscii-nonascii-translation-table table)
- (define-translation-table 'viet-vscii-encode-table
- (char-table-extra-slot table 0)))
-
-;; Does not support combining characters in the range [176, 180]
-(defvar viet-tcvn-decode-table
- [;; TCVN is a full 8-bit code.
- 0 ?,2z(B ?,2x(B 3 ?,2W(B ?,2X(B ?,2f(B 7 8 9 10 11 12 13 14 15
- 16 ?,2Q(B ?,2q(B ?,2O(B ?,2V(B ?,2[(B ?,2}(B ?,2\(B 24 25 26 27 28 29 30 31
- 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
- 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
- 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
- 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
- 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
- 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
- ?,2`(B ?,2d(B ?,2c(B ?,2a(B ?,2U(B ?,2#(B ?,2'(B ?,2h(B ?,2k(B ?,2((B ?,2i(B ?,2)(B ?,2.(B ?,2l(B ?,2o(B ?,2n(B
- ?,2m(B ?,28(B ?,2r(B ?,2v(B ?,2u(B ?,2s(B ?,2w(B ?,25(B ?,26(B ?,27(B ?,2^(B ?,2>(B ?,2~(B ?,2y(B ?,2|(B ?,2{(B
- 160 ?,2e(B ?,2b(B ?,2j(B ?,2t(B ?,2=(B ?,2_(B ?,2p(B ?,1e(B ?,1b(B ?,1j(B ?,1t(B ?,1=(B ?,1_(B ?,1p(B ?,2"(B
- 176 177 178 179 180 ?,1`(B ?,1d(B ?,1c(B ?,1a(B ?,1U(B ?,2F(B ?,1"(B ?,1F(B ?,1G(B ?,1!(B ?,2G(B
- ?,2!(B ?,2%(B ?,2&(B ?,2g(B ?,2$(B ?,2+(B ?,1#(B ?,1%(B ?,1&(B ?,1g(B ?,1$(B ?,1'(B ?,1h(B ?,2,(B ?,1k(B ?,1((B
- ?,1i(B ?,1)(B ?,1+(B ?,1,(B ?,1-(B ?,1*(B ?,1.(B ?,1l(B ?,1o(B ?,2-(B ?,2*(B ?,20(B ?,1n(B ?,1m(B ?,18(B ?,1r(B
- ?,21(B ?,1v(B ?,1u(B ?,1s(B ?,1w(B ?,10(B ?,11(B ?,12(B ?,1/(B ?,15(B ?,16(B ?,17(B ?,1^(B ?,1>(B ?,1~(B ?,1y(B
- ?,22(B ?,1|(B ?,1{(B ?,1z(B ?,1x(B ?,1W(B ?,1X(B ?,1f(B ?,1Q(B ?,1q(B ?,1O(B ?,1V(B ?,1[(B ?,1}(B ?,1\(B ?,2/(B]
- "Vietnamese TCVN-5712 decoding table.")
-
-(let ((table (make-translation-table-from-vector viet-tcvn-decode-table)))
- (define-translation-table 'viet-tcvn-nonascii-translation-table table)
- (define-translation-table 'viet-tcvn-encode-table
- (char-table-extra-slot table 0)))
-
-;; (defvar viet-vps-decode-table
-;; [;; VPS is a full 8-bit code.
-;; 0 1 ?,2U(B ?,2'(B ?,2#(B ?,2)(B ?,2.(B 7 8 9 10 11 12 13 14 15
-;; ?,28(B ?,2w(B ?,25(B ?,2~(B ?,2x(B ?,2q(B 22 23 24 ?,2\(B 26 27 ?,2g(B ?,2f(B 30 31
-;; 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
-;; 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
-;; 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
-;; 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
-;; 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
-;; 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127
-;; ?,2`(B ?,2d(B ?,2c(B ?,2$(B ?,2%(B ?,2&(B ?,1w(B ?,12(B ?,2e(B ?,1*(B ?,1+(B ?,1,(B ?,1.(B ?,2!(B ?,2"(B ?,2F(B
-;; ?,2*(B 145 146 ?,2+(B ?,2,(B ?,2-(B ?,2/(B ?,20(B ?,21(B ?,22(B ?,1}(B ?,1V(B ?,1\(B ?,2>(B ?,26(B ?,27(B
-;; 160 ?,1!(B ?,1"(B ?,1F(B ?,1G(B ?,1#(B ?,2^(B ?,1>(B ?,2y(B ?,16(B ?,17(B ?,1^(B ?,2{(B ?,2Q(B ?,1~(B ?,2W(B
-;; ?,11(B ?,2X(B ?,2O(B ?,2[(B ?,2m(B ?,2l(B ?,15(B ?,2o(B ?,2n(B ?,2s(B ?,1X(B ?,1f(B ?,2r(B ?,2v(B ?,2u(B ?,1q(B
-;; ?,1%(B ?,2a(B ?,2b(B ?,1$(B ?,1&(B ?,1g(B ?,1'(B ?,1p(B ?,1k(B ?,2i(B ?,2j(B ?,1)(B ?,1o(B ?,1-(B ?,18(B ?,1[(B
-;; ?,2_(B ?,2|(B ?,10(B ?,1/(B ?,2t(B ?,1v(B ?,1=(B ?,2h(B ?,1W(B ?,1Q(B ?,2z(B ?,1{(B ?,1_(B ?,2}(B ?,2k(B 223
-;; ?,1`(B ?,1a(B ?,1b(B ?,1c(B ?,1d(B ?,1U(B ?,1e(B 231 ?,1h(B ?,1i(B ?,1j(B ?,1((B ?,1l(B ?,1m(B 238 ?,1n(B
-;; ?,2G(B ?,2p(B ?,1r(B ?,1s(B ?,1t(B ?,1u(B 246 ?,2=(B ?,1x(B ?,1y(B ?,1z(B ?,1|(B 252 ?,2V(B ?,2((B ?,1O(B]
-;; "Vietnamese VPS decoding table.")
-;;
-;; (let ((table (make-translation-table-from-vector viet-vps-decode-table)))
-;; (define-translation-table 'viet-vps-nonascii-translation-table table)
-;; (define-translation-table 'viet-vps-encode-table
-;; (char-table-extra-slot table 0)))
-
-(define-ccl-program ccl-decode-viscii
- `(3
- ((loop
- (r0 = 0)
- (read r1)
- (translate-character viet-viscii-nonascii-translation-table r0 r1)
- (write-multibyte-character r0 r1)
- (repeat))))
- "CCL program to decode VISCII 1.1")
-
-(define-ccl-program ccl-encode-viscii
- `(1
- ((loop
- (read-multibyte-character r0 r1)
- (translate-character viet-viscii-encode-table r0 r1)
- (write-repeat r1))))
- "CCL program to encode VISCII 1.1")
-
-(define-ccl-program ccl-encode-viscii-font
- `(0
- ;; In: R0:vietnamese-viscii-lower/vietnamese-viscii-upper
- ;; R1:position code
- ;; Out: R1:font code point
- (translate-character viet-viscii-encode-table r0 r1))
- "CCL program to encode Vietnamese chars to VISCII 1.1 font")
-
-(define-ccl-program ccl-decode-vscii
- `(3
- ((loop
- (r0 = 0)
- (read r1)
- (translate-character viet-vscii-nonascii-translation-table r0 r1)
- (write-multibyte-character r0 r1)
- (repeat))))
- "CCL program to decode VSCII-1.")
-
-(define-ccl-program ccl-encode-vscii
- `(1
- ((loop
- (read-multibyte-character r0 r1)
- (translate-character viet-vscii-encode-table r0 r1)
- (write-repeat r1))))
- "CCL program to encode VSCII-1.")
-
-(define-ccl-program ccl-encode-vscii-font
- `(0
- ;; In: R0:vietnamese-viscii-lower/vietnamese-viscii-upper
- ;; R1:position code
- ;; Out: R1:font code point
- (translate-character viet-vscii-encode-table r0 r1))
- "CCL program to encode Vietnamese chars to VSCII-1 font.")
-
-(define-ccl-program ccl-decode-tcvn
- `(3
- ((loop
- (r0 = 0)
- (read r1)
- (translate-character viet-tcvn-nonascii-translation-table r0 r1)
- (write-multibyte-character r0 r1)
- (repeat))))
- "CCL program to decode TCVN-5712.")
-
-(define-ccl-program ccl-encode-tcvn
- `(1
- ((loop
- (read-multibyte-character r0 r1)
- (translate-character viet-tcvn-encode-table r0 r1)
- (write-repeat r1))))
- "CCL program to encode TCVN-5712.")
-
-(define-ccl-program ccl-encode-tcvn-font
- `(0
- ;; In: R0:vietnamese-viscii-lower/vietnamese-viscii-upper
- ;; R1:position code
- ;; Out: R1:font code point
- (translate-character viet-tcvn-encode-table r0 r1))
- "CCL program to encode Vietnamese chars to TCVN-5712 font.")
-
-;; (define-ccl-program ccl-decode-vps
-;; `(3
-;; ((loop
-;; (r0 = 0)
-;; (read r1)
-;; (translate-character viet-vps-nonascii-translation-table r0 r1)
-;; (write-multibyte-character r0 r1)
-;; (repeat))))
-;; "CCL program to decode VPS.")
-;;
-;; (define-ccl-program ccl-encode-vps
-;; `(1
-;; ((loop
-;; (read-multibyte-character r0 r1)
-;; (translate-character viet-vps-encode-table r0 r1)
-;; (write-repeat r1))))
-;; "CCL program to encode VPS.")
-;;
-;; (define-ccl-program ccl-encode-vps-font
-;; `(0
-;; ;; In: R0:vietnamese-viscii-lower/vietnamese-viscii-upper
-;; ;; R1:position code
-;; ;; Out: R1:font code point
-;; (translate-character viet-vps-encode-table r0 r1))
-;; "CCL program to encode Vietnamese chars to VPS font.")
-
-(make-coding-system
- 'vietnamese-viscii 4 ?V
- "8-bit encoding for Vietnamese VISCII 1.1 (MIME:VISCII)"
- '(ccl-decode-viscii . ccl-encode-viscii)
- '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper)
- (mime-charset . viscii)
- (valid-codes (0 . 255))))
+(define-coding-system 'vietnamese-viscii
+ "8-bit encoding for Vietnamese VISCII 1.1 (MIME:VISCII)."
+ :coding-type 'charset
+ :mnemonic ?V
+ :charset-list '(viscii)
+ :mime-charset 'viscii
+ :suitable-for-file-name t)
(define-coding-system-alias 'viscii 'vietnamese-viscii)
-(make-coding-system
- 'vietnamese-vscii 4 ?v
- "8-bit encoding for Vietnamese VSCII-1"
- '(ccl-decode-vscii . ccl-encode-vscii)
- '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper)
- (valid-codes (0 . 255))))
+(define-coding-system 'vietnamese-vscii
+ "8-bit encoding for Vietnamese VSCII-1."
+ :coding-type 'charset
+ :mnemonic ?v
+ :charset-list '(vscii)
+ :suitable-for-file-name t)
(define-coding-system-alias 'vscii 'vietnamese-vscii)
-(make-coding-system
- 'vietnamese-tcvn 4 ?t
- "8-bit encoding for Vietnamese TCVN-5712"
- '(ccl-decode-tcvn . ccl-encode-tcvn)
- '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper)
- (valid-codes (0 . 255))))
-
-(define-coding-system-alias 'tcvn 'vietnamese-tcvn)
-(define-coding-system-alias 'tcvn-5712 'vietnamese-tcvn)
-
;; (make-coding-system
;; 'vietnamese-vps 4 ?p
;; "8-bit encoding for Vietnamese VPS"
@@ -279,36 +64,21 @@
;;
;; (define-coding-system-alias 'vps 'vietnamese-vps)
-(make-coding-system
- 'vietnamese-viqr 0 ?q
- "Vietnamese latin transcription (VIQR)"
- nil
- '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper)
- (post-read-conversion . viqr-post-read-conversion)
- (pre-write-conversion . viqr-pre-write-conversion)
- (charset-origin-alist
- (vietnamese-viscii-lower "VISCII" viet-encode-viscii-char)
- (vietnamese-viscii-upper "VISCII" viet-encode-viscii-char))))
-
+(define-coding-system 'vietnamese-viqr
+ "Vietnamese latin transcription (VIQR)."
+ :coding-type 'utf-8
+ :mnemonic ?q
+ :charset-list '(ascii viscii)
+ :post-read-conversion 'viqr-post-read-conversion
+ :pre-write-conversion 'viqr-pre-write-conversion)
(define-coding-system-alias 'viqr 'vietnamese-viqr)
-(setq font-ccl-encoder-alist
- (cons '("viscii" . ccl-encode-viscii-font) font-ccl-encoder-alist))
-
-(setq font-ccl-encoder-alist
- (cons '("vscii" . ccl-encode-vscii-font) font-ccl-encoder-alist))
-
-(setq font-ccl-encoder-alist
- (cons '("tcvn" . ccl-encode-tcvn-font) font-ccl-encoder-alist))
-
(set-language-info-alist
- "Vietnamese" `((charset vietnamese-viscii-lower vietnamese-viscii-upper)
- (nonascii-translation
- . ,(get 'viet-viscii-nonascii-translation-table
- 'translation-table))
- (coding-system vietnamese-viscii vietnamese-vscii vietnamese-tcvn
- vietnamese-viqr)
+ "Vietnamese" `((charset viscii)
+ (coding-system vietnamese-viscii vietnamese-vscii
+ vietnamese-tcvn vietnamese-viqr windows-1258)
+ (nonascii-translation . viscii)
(coding-priority vietnamese-viscii)
(input-method . "vietnamese-viqr")
(unibyte-display . vietnamese-viscii)
@@ -316,13 +86,29 @@
(sample-text . "Vietnamese (Ti,1*(Bng Vi,1.(Bt) Ch,1`(Bo b,1U(Bn")
(documentation . "\
For Vietnamese, Emacs uses special charsets internally.
-They can be decoded from and encoded to VISCII, VSCII, TCVN-5712, and
-VIQR. VSCII is deprecated in favour of TCVN-5712. Current setting
-puts higher priority to the coding system VISCII than TCVN-5712. If
-you prefer TCVN-5712, please do: (prefer-coding-system 'vietnamese-tcvn).
-There are two Vietnamese input methods: VIQR and Telex, VIQR is the
-default setting.")
- ))
+They can be decoded from and encoded to VISCII, VSCII, TCVN-5712, VIQR
+and windows-1258. VSCII is deprecated in favour of TCVN-5712. The
+Current setting gives higher priority to the coding system VISCII than
+TCVN-5712. If you prefer TCVN-5712, please do: (prefer-coding-system
+'vietnamese-tcvn). There are two Vietnamese input methods: VIQR and
+Telex, VIQR is the default setting.")))
+
+(define-coding-system 'windows-1258
+ "windows-1258 encoding for Vietnamese (MIME: WINDOWS-1258)"
+ :coding-type 'charset
+ :mnemonic ?*
+ :charset-list '(windows-1258)
+ :mime-charset 'windows-1258)
+(define-coding-system-alias 'cp1258 'windows-1258)
+
+(define-coding-system 'vietnamese-tcvn
+ "8-bit encoding for Vietnamese TCVN-5712"
+ :coding-type 'charset
+ :mnemonic ?t
+ :charset-list '(tcvn-5712)
+ :suitable-for-file-name t)
+(define-coding-system-alias 'tcvn 'vietnamese-tcvn)
+(define-coding-system-alias 'tcvn-5712 'vietnamese-tcvn)
(provide 'vietnamese)