comparison lisp/language/ethiopic.el @ 17052:d0d7b244b1d0

Initial revision
author Karl Heuer <kwzh@gnu.org>
date Thu, 20 Feb 1997 07:02:49 +0000
parents
children 70194012fb3a
comparison
equal deleted inserted replaced
17051:fd0b17a79b07 17052:d0d7b244b1d0
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
21 ;; along with GNU Emacs; see the file COPYING. If not, write to
22 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
23
24 ;;; Code:
25
26 (define-ccl-program ccl-encode-ethio-font
27 '(0
28 ;; In: R0:ethio (not checked)
29 ;; R1:position code 1
30 ;; R2:position code 2
31 ;; Out: R1:font code point 1
32 ;; R2:font code point 2
33 ((r1 -= 33)
34 (r2 -= 33)
35 (r1 *= 94)
36 (r2 += r1)
37 (if (r2 < 256) (r1 = 0) ((r2 -= 256) (r1 = 1)))))
38 "CCL program to encode an Ehitopic code to code point of Ehitopic font.")
39
40 (setq font-ccl-encoder-alist
41 (cons (cons "ethio" ccl-encode-ethio-font) font-ccl-encoder-alist))
42
43 (register-input-method
44 "Ethiopic" '("quail-ethio" quail-use-package "quail/ethio"))
45
46 (defun setup-ethio-environment ()
47 (setq primary-language "Ethiopic")
48
49 (setq default-input-method '("Ethiopic" . "quail-ethio"))
50
51 ;;
52 ;; key bindings
53 ;;
54 (define-key global-map [f4] 'sera-to-fidel-buffer)
55 (define-key global-map [S-f4] 'sera-to-fidel-region)
56 (define-key global-map [C-f4] 'sera-to-fidel-marker)
57 (define-key global-map [f5] 'fidel-to-sera-buffer)
58 (define-key global-map [S-f5] 'fidel-to-sera-region)
59 (define-key global-map [C-f5] 'fidel-to-sera-marker)
60 (define-key global-map [f6] 'ethio-modify-vowel)
61 (define-key global-map [f7] 'ethio-replace-space)
62 (define-key global-map [S-f2] 'ethio-replace-space) ; as requested
63 (define-key global-map [f8] 'ethio-input-special-character)
64
65 (add-hook
66 'rmail-mode-hook
67 '(lambda ()
68 (define-key rmail-mode-map [C-f4] 'sera-to-fidel-mail)
69 (define-key rmail-mode-map [C-f5] 'fidel-to-sera-mail)))
70
71 (add-hook
72 'mail-mode-hook
73 '(lambda ()
74 (define-key mail-mode-map [C-f4] 'sera-to-fidel-mail)
75 (define-key mail-mode-map [C-f5] 'fidel-to-sera-mail)))
76 )
77
78 (set-language-info-alist
79 "Ethiopic" '((setup-function . setup-ethio-environment)
80 (charset . (ethiopic))
81 (documentation . t)
82 (sample-text
83 . "Amharic ($(2"S!,!6!l(B) $(2#Q!$!.(B, Tigrigna ($(2!V#>!6!l(B) $(2"C!$!,!V(B")))
84
85 ;;; ethiopic.el ends here