78 |
(setq key-bindings (cdr key-bindings)))) |
(setq key-bindings (cdr key-bindings)))) |
79 |
|
|
80 |
(add-hook 'quail-activate-hook 'ethio-select-a-translation) |
(add-hook 'quail-activate-hook 'ethio-select-a-translation) |
81 |
(add-hook 'find-file-hooks 'ethio-find-file) |
(add-hook 'find-file-hook 'ethio-find-file) |
82 |
(add-hook 'write-file-hooks 'ethio-write-file) |
(add-hook 'write-file-functions 'ethio-write-file) |
83 |
(add-hook 'after-save-hook 'ethio-find-file)) |
(add-hook 'after-save-hook 'ethio-find-file)) |
84 |
|
|
85 |
(defun exit-ethiopic-environment () |
(defun exit-ethiopic-environment () |
86 |
"Exit Ethiopic language environment" |
"Exit Ethiopic language environment." |
87 |
(while exit-ethiopic-environment-data |
(while exit-ethiopic-environment-data |
88 |
(global-set-key (car (car exit-ethiopic-environment-data)) |
(global-set-key (car (car exit-ethiopic-environment-data)) |
89 |
(cdr (car exit-ethiopic-environment-data))) |
(cdr (car exit-ethiopic-environment-data))) |
91 |
(cdr exit-ethiopic-environment-data))) |
(cdr exit-ethiopic-environment-data))) |
92 |
|
|
93 |
(remove-hook 'quail-activate-hook 'ethio-select-a-translation) |
(remove-hook 'quail-activate-hook 'ethio-select-a-translation) |
94 |
(remove-hook 'find-file-hooks 'ethio-find-file) |
(remove-hook 'find-file-hook 'ethio-find-file) |
95 |
(remove-hook 'write-file-hooks 'ethio-write-file) |
(remove-hook 'write-file-functions 'ethio-write-file) |
96 |
(remove-hook 'after-save-hook 'ethio-find-file)) |
(remove-hook 'after-save-hook 'ethio-find-file)) |
97 |
|
|
98 |
;; |
;; |
103 |
;; but file I/O is done in SERA. |
;; but file I/O is done in SERA. |
104 |
;; |
;; |
105 |
;; If the filename ends in ".java", editing is done in fidel |
;; If the filename ends in ".java", editing is done in fidel |
106 |
;; but file I/O is done in the \uXXXX style, where XXXX is |
;; but file I/O is done in the \uXXXX style, where XXXX is |
107 |
;; the Unicode codepoint for the Ethiopic character. |
;; the Unicode codepoint for the Ethiopic character. |
108 |
;; |
;; |
109 |
;; If the filename ends in ".tex", editing is done in fidel |
;; If the filename ends in ".tex", editing is done in fidel |
168 |
;; |
;; |
169 |
;; SERA to FIDEL |
;; SERA to FIDEL |
170 |
;; |
;; |
171 |
|
|
172 |
(defconst ethio-sera-to-fidel-table |
(defconst ethio-sera-to-fidel-table |
173 |
[ |
[ |
174 |
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 |
230 |
;;; I |
;;; I |
231 |
("$(3"h(B" (?2 "$(3#:(B")) |
("$(3"h(B" (?2 "$(3#:(B")) |
232 |
;;; J |
;;; J |
233 |
("$(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") |
("$(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") |
234 |
(?W "$(3#l(B" (?a "$(3#l(B") |
(?W "$(3#l(B" (?a "$(3#l(B") |
235 |
(?e "$(3#j%n(B") (?u "$(3#j%r(B") (?i "$(3#j%o(B") (?E "$(3#j%q(B"))) |
(?e "$(3#j%n(B") (?u "$(3#j%r(B") (?i "$(3#j%o(B") (?E "$(3#j%q(B"))) |
236 |
;;; K |
;;; K |
301 |
(?! "$(3%t(B") |
(?! "$(3%t(B") |
302 |
(?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#5(B") (?u "$(3#6(B") (?U "$(3#6(B") (?i "$(3#7(B") (?a "$(3#8(B") (?A "$(3#8(B") |
303 |
(?E "$(3#9(B") (?I "$(3#:(B") (?o "$(3#;(B") (?O "$(3#;(B") |
(?E "$(3#9(B") (?I "$(3#:(B") (?o "$(3#;(B") (?O "$(3#;(B") |
304 |
(?g "$(3%^(B" |
(?g "$(3%^(B" |
305 |
(?e "$(3%Y(B") (?u "$(3%Z(B") (?i "$(3%[(B") (?a "$(3%\(B") (?E "$(3%](B") (?o "$(3%_(B")) |
(?e "$(3%Y(B") (?u "$(3%Z(B") (?i "$(3%[(B") (?a "$(3%\(B") (?E "$(3%](B") (?o "$(3%_(B")) |
306 |
(?h "$(3"H(B" |
(?h "$(3"H(B" |
307 |
(?e "$(3"C(B") (?u "$(3"D(B") (?i "$(3"E(B") (?a "$(3"F(B") (?E "$(3"G(B") (?o "$(3"I(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") |
308 |
(?W "$(3"P(B" (?e "$(3"K(B") (?u "$(3"P(B") (?i "$(3"M(B") (?a "$(3"N(B") (?E "$(3"O(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"))) |
309 |
(?k "$(3%>(B" |
(?k "$(3%>(B" |
310 |
(?e "$(3%9(B") (?u "$(3%:(B") (?i "$(3%;(B") (?a "$(3%<(B") (?E "$(3%=(B") (?o "$(3%?(B")) |
(?e "$(3%9(B") (?u "$(3%:(B") (?i "$(3%;(B") (?a "$(3%<(B") (?E "$(3%=(B") (?o "$(3%?(B")) |
311 |
(?s "$(3!F(B" |
(?s "$(3!F(B" |
312 |
(?e "$(3!A(B") (?u "$(3!B(B") (?i "$(3!C(B") (?a "$(3!D(B") (?E "$(3!E(B") (?o "$(3!G(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") |
313 |
(?W "$(3!H(B" (?a "$(3!H(B") |
(?W "$(3!H(B" (?a "$(3!H(B") |
314 |
(?e "$(3!F%n(B") (?u "$(3!F%r(B") (?i "$(3!F%o(B") (?E "$(3!F%q(B"))) |
(?e "$(3!F%n(B") (?u "$(3!F%r(B") (?i "$(3!F%o(B") (?E "$(3!F%q(B"))) |
315 |
(?S "$(3$L(B" |
(?S "$(3$L(B" |
316 |
(?e "$(3$G(B") (?u "$(3$H(B") (?i "$(3$I(B") (?a "$(3$J(B") (?E "$(3$K(B") (?o "$(3$M(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") |
317 |
(?W "$(3$F(B" (?a "$(3$F(B") |
(?W "$(3$F(B" (?a "$(3$F(B") |
318 |
(?e "$(3$L%n(B") (?u "$(3$L%r(B") (?i "$(3$L%o(B") (?E "$(3$L%q(B"))) |
(?e "$(3$L%n(B") (?u "$(3$L%r(B") (?i "$(3$L%o(B") (?E "$(3$L%q(B"))) |
337 |
(?W "$(3%d(B" (?e "$(3%4(B") (?u "$(3%d(B") (?i "$(3%D(B") (?a "$(3$V(B") (?E "$(3%T(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")) |
338 |
(?Y "$(3$a(B" (?a "$(3$a(B"))) |
(?Y "$(3$a(B" (?a "$(3$a(B"))) |
339 |
;;; g |
;;; g |
340 |
("$(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") |
("$(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") |
341 |
(?W "$(3#z(B" (?e "$(3#u(B") (?u "$(3#z(B") (?i "$(3#w(B") (?a "$(3#x(B") (?E "$(3#y(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")) |
342 |
(?2 "$(3%^(B" (?e "$(3%Y(B") (?u "$(3%Z(B") (?i "$(3%[(B") (?a "$(3%\(B") (?E "$(3%](B") (?o "$(3%_(B"))) |
(?2 "$(3%^(B" (?e "$(3%Y(B") (?u "$(3%Z(B") (?i "$(3%[(B") (?a "$(3%\(B") (?E "$(3%](B") (?o "$(3%_(B"))) |
343 |
;;; h |
;;; h |
348 |
;;; i |
;;; i |
349 |
("$(3"e(B" (?2 "$(3#7(B")) |
("$(3"e(B" (?2 "$(3#7(B")) |
350 |
;;; j |
;;; j |
351 |
("$(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") |
("$(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") |
352 |
(?W "$(3#l(B" (?a "$(3#l(B") |
(?W "$(3#l(B" (?a "$(3#l(B") |
353 |
(?e "$(3#j%n(B") (?u "$(3#j%r(B") (?i "$(3#j%o(B") (?E "$(3#j%q(B"))) |
(?e "$(3#j%n(B") (?u "$(3#j%r(B") (?i "$(3#j%o(B") (?E "$(3#j%q(B"))) |
354 |
;;; k |
;;; k |
580 |
start table table2 ch) |
start table table2 ch) |
581 |
|
|
582 |
(setcar (aref ethio-sera-to-fidel-table ?a) |
(setcar (aref ethio-sera-to-fidel-table ?a) |
583 |
(if (eq lang 'tigrigna) "$(3"f(B" "$(3"c(B")) |
(if (eq lang 'tigrigna) "$(3"f(B" "$(3"c(B")) |
584 |
|
|
585 |
(while (and (not (eobp)) (null new-language)) |
(while (and (not (eobp)) (null new-language)) |
586 |
(setq ch (following-char)) |
(setq ch (following-char)) |
773 |
((or (string= flag "ti") (string= flag "tir")) 'tigrigna) |
((or (string= flag "ti") (string= flag "tir")) 'tigrigna) |
774 |
((or (string= flag "am") (string= flag "amh")) 'amharic) |
((or (string= flag "am") (string= flag "amh")) 'amharic) |
775 |
(t nil))) |
(t nil))) |
776 |
|
|
777 |
(defun ethio-convert-digit nil |
(defun ethio-convert-digit nil |
778 |
"Convert Arabic digits to Ethiopic digits." |
"Convert Arabic digits to Ethiopic digits." |
779 |
(let (ch z) |
(let (ch z) |
1114 |
fidel nil |
fidel nil |
1115 |
digit t)) |
digit t)) |
1116 |
|
|
1117 |
;; reduction = 2 and following 10s, 100s, 10000s |
;; reduction = 2 and following 10s, 100s, 10000s |
1118 |
((and (= ethio-numeric-reduction 2) |
((and (= ethio-numeric-reduction 2) |
1119 |
(memq ch '(370 379 380))) |
(memq ch '(370 379 380))) |
1120 |
(insert (substring (aref ethio-fidel-to-sera-map ch) 1)) |
(insert (substring (aref ethio-fidel-to-sera-map ch) 1)) |
1811 |
(insert (ethio-ethiocode-to-char (- ucode 64560)))) |
(insert (ethio-ethiocode-to-char (- ucode 64560)))) |
1812 |
(t |
(t |
1813 |
nil))) |
nil))) |
1814 |
|
|
1815 |
;; gemination |
;; gemination |
1816 |
(goto-char (point-min)) |
(goto-char (point-min)) |
1817 |
(while (re-search-forward "\\ce$(3%s(B" nil 0) |
(while (re-search-forward "\\ce$(3%s(B" nil 0) |
1984 |
|
|
1985 |
(defun ethio-gemination nil |
(defun ethio-gemination nil |
1986 |
"Compose the character before the point with the Ethiopic gemination mark. |
"Compose the character before the point with the Ethiopic gemination mark. |
1987 |
If the characater is already composed, decompose it and remove the gemination |
If the character is already composed, decompose it and remove the gemination |
1988 |
mark." |
mark." |
1989 |
(interactive "*") |
(interactive "*") |
1990 |
(cond |
(cond |