17052
|
1 ;;; ethiopic.el --- Support for Ethiopic
|
|
2
|
|
3 ;; Copyright (C) 1995 Free Software Foundation, Inc.
|
|
4 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
|
|
5
|
|
6 ;; Keywords: multilingual, Ethiopic
|
|
7
|
|
8 ;; This file is part of GNU Emacs.
|
|
9
|
|
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
|
|
11 ;; it under the terms of the GNU General Public License as published by
|
|
12 ;; the Free Software Foundation; either version 2, or (at your option)
|
|
13 ;; any later version.
|
|
14
|
|
15 ;; GNU Emacs is distributed in the hope that it will be useful,
|
|
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
18 ;; GNU General Public License for more details.
|
|
19
|
|
20 ;; You should have received a copy of the GNU General Public License
|
17071
|
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
|
|
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
23 ;; Boston, MA 02111-1307, USA.
|
17052
|
24
|
|
25 ;;; Code:
|
|
26
|
|
27 (define-ccl-program ccl-encode-ethio-font
|
|
28 '(0
|
|
29 ;; In: R0:ethio (not checked)
|
|
30 ;; R1:position code 1
|
|
31 ;; R2:position code 2
|
|
32 ;; Out: R1:font code point 1
|
|
33 ;; R2:font code point 2
|
|
34 ((r1 -= 33)
|
|
35 (r2 -= 33)
|
|
36 (r1 *= 94)
|
|
37 (r2 += r1)
|
|
38 (if (r2 < 256) (r1 = 0) ((r2 -= 256) (r1 = 1)))))
|
|
39 "CCL program to encode an Ehitopic code to code point of Ehitopic font.")
|
|
40
|
|
41 (setq font-ccl-encoder-alist
|
|
42 (cons (cons "ethio" ccl-encode-ethio-font) font-ccl-encoder-alist))
|
|
43
|
|
44 (register-input-method
|
|
45 "Ethiopic" '("quail-ethio" quail-use-package "quail/ethio"))
|
|
46
|
|
47 (defun setup-ethio-environment ()
|
|
48 (setq primary-language "Ethiopic")
|
|
49
|
|
50 (setq default-input-method '("Ethiopic" . "quail-ethio"))
|
|
51
|
|
52 ;;
|
|
53 ;; key bindings
|
|
54 ;;
|
|
55 (define-key global-map [f4] 'sera-to-fidel-buffer)
|
|
56 (define-key global-map [S-f4] 'sera-to-fidel-region)
|
|
57 (define-key global-map [C-f4] 'sera-to-fidel-marker)
|
|
58 (define-key global-map [f5] 'fidel-to-sera-buffer)
|
|
59 (define-key global-map [S-f5] 'fidel-to-sera-region)
|
|
60 (define-key global-map [C-f5] 'fidel-to-sera-marker)
|
|
61 (define-key global-map [f6] 'ethio-modify-vowel)
|
|
62 (define-key global-map [f7] 'ethio-replace-space)
|
|
63 (define-key global-map [S-f2] 'ethio-replace-space) ; as requested
|
|
64 (define-key global-map [f8] 'ethio-input-special-character)
|
|
65
|
|
66 (add-hook
|
|
67 'rmail-mode-hook
|
|
68 '(lambda ()
|
|
69 (define-key rmail-mode-map [C-f4] 'sera-to-fidel-mail)
|
|
70 (define-key rmail-mode-map [C-f5] 'fidel-to-sera-mail)))
|
|
71
|
|
72 (add-hook
|
|
73 'mail-mode-hook
|
|
74 '(lambda ()
|
|
75 (define-key mail-mode-map [C-f4] 'sera-to-fidel-mail)
|
|
76 (define-key mail-mode-map [C-f5] 'fidel-to-sera-mail)))
|
|
77 )
|
|
78
|
|
79 (set-language-info-alist
|
|
80 "Ethiopic" '((setup-function . setup-ethio-environment)
|
|
81 (charset . (ethiopic))
|
|
82 (documentation . t)
|
|
83 (sample-text
|
|
84 . "Amharic ($(2"S!,!6!l(B) $(2#Q!$!.(B, Tigrigna ($(2!V#>!6!l(B) $(2"C!$!,!V(B")))
|
|
85
|
|
86 ;;; ethiopic.el ends here
|