Mercurial > emacs
annotate lisp/language/ethiopic.el @ 17882:46f958bf3348
(fs_load_font): Modified to cope with the above change
in x_load_font (xterm.c).
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 19 May 1997 03:33:50 +0000 |
parents | 084d922fcd78 |
children | 73869115ae0a |
rev | line source |
---|---|
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 | |
17314
f438ebf1c679
Fix FSF address in comment.
Kenichi Handa <handa@m17n.org>
parents:
17299
diff
changeset
|
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
f438ebf1c679
Fix FSF address in comment.
Kenichi Handa <handa@m17n.org>
parents:
17299
diff
changeset
|
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
f438ebf1c679
Fix FSF address in comment.
Kenichi Handa <handa@m17n.org>
parents:
17299
diff
changeset
|
23 ;; Boston, MA 02111-1307, USA. |
17299 | 24 |
25 ;; Author: TAKAHASHI Naoto <ntakahas@etl.go.jp> | |
17052 | 26 |
27 ;;; Code: | |
28 | |
29 (define-ccl-program ccl-encode-ethio-font | |
30 '(0 | |
17299 | 31 ;; In: R0:ethiopic (not checked) |
17052 | 32 ;; R1:position code 1 |
33 ;; R2:position code 2 | |
34 ;; Out: R1:font code point 1 | |
35 ;; R2:font code point 2 | |
36 ((r1 -= 33) | |
37 (r2 -= 33) | |
38 (r1 *= 94) | |
39 (r2 += r1) | |
17299 | 40 (if (r2 < 256) |
41 (r1 = ?\x12) | |
42 (if (r2 < 448) | |
43 ((r1 = ?\x13) (r2 -= 256)) | |
44 ((r1 = ?\xfd) (r2 -= 208)) | |
45 )))) | |
17052 | 46 "CCL program to encode an Ehitopic code to code point of Ehitopic font.") |
47 | |
48 (setq font-ccl-encoder-alist | |
17299 | 49 (cons (cons "ethiopic" ccl-encode-ethio-font) font-ccl-encoder-alist)) |
17052 | 50 |
51 (register-input-method | |
17299 | 52 "Ethiopic" '("quail-ethio" quail-use-package "quail/ethiopic")) |
17052 | 53 |
17772
550afdbb31d8
Make functions setup-LANGUAGE-environment
Kenichi Handa <handa@m17n.org>
parents:
17314
diff
changeset
|
54 (defun setup-ethiopic-environment () |
550afdbb31d8
Make functions setup-LANGUAGE-environment
Kenichi Handa <handa@m17n.org>
parents:
17314
diff
changeset
|
55 "Setup multilingual environment for Ethiopic." |
550afdbb31d8
Make functions setup-LANGUAGE-environment
Kenichi Handa <handa@m17n.org>
parents:
17314
diff
changeset
|
56 (interactive) |
17052 | 57 (setq primary-language "Ethiopic") |
58 | |
59 (setq default-input-method '("Ethiopic" . "quail-ethio")) | |
60 | |
61 ;; | |
62 ;; key bindings | |
63 ;; | |
64 (define-key global-map [f4] 'sera-to-fidel-buffer) | |
65 (define-key global-map [S-f4] 'sera-to-fidel-region) | |
66 (define-key global-map [C-f4] 'sera-to-fidel-marker) | |
67 (define-key global-map [f5] 'fidel-to-sera-buffer) | |
68 (define-key global-map [S-f5] 'fidel-to-sera-region) | |
69 (define-key global-map [C-f5] 'fidel-to-sera-marker) | |
70 (define-key global-map [f6] 'ethio-modify-vowel) | |
71 (define-key global-map [f7] 'ethio-replace-space) | |
17299 | 72 (define-key global-map [f8] 'ethio-input-special-character) |
17052 | 73 (define-key global-map [S-f2] 'ethio-replace-space) ; as requested |
74 | |
75 (add-hook | |
76 'rmail-mode-hook | |
77 '(lambda () | |
78 (define-key rmail-mode-map [C-f4] 'sera-to-fidel-mail) | |
79 (define-key rmail-mode-map [C-f5] 'fidel-to-sera-mail))) | |
80 | |
81 (add-hook | |
82 'mail-mode-hook | |
83 '(lambda () | |
84 (define-key mail-mode-map [C-f4] 'sera-to-fidel-mail) | |
85 (define-key mail-mode-map [C-f5] 'fidel-to-sera-mail))) | |
86 ) | |
87 | |
88 (set-language-info-alist | |
17772
550afdbb31d8
Make functions setup-LANGUAGE-environment
Kenichi Handa <handa@m17n.org>
parents:
17314
diff
changeset
|
89 "Ethiopic" '((setup-function . setup-ethiopic-environment) |
17052 | 90 (charset . (ethiopic)) |
17772
550afdbb31d8
Make functions setup-LANGUAGE-environment
Kenichi Handa <handa@m17n.org>
parents:
17314
diff
changeset
|
91 (sample-text . "$(3$O#U!.(B") |
17841
084d922fcd78
Coding system names changed as follows:
Kenichi Handa <handa@m17n.org>
parents:
17772
diff
changeset
|
92 (documentation . t))) |
17052 | 93 |
94 ;;; ethiopic.el ends here |