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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1 ;;; ethiopic.el --- Support for Ethiopic
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
2
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
3 ;; Copyright (C) 1995 Free Software Foundation, Inc.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
4 ;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
5
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
6 ;; Keywords: multilingual, Ethiopic
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
7
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
8 ;; This file is part of GNU Emacs.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
9
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
11 ;; it under the terms of the GNU General Public License as published by
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your option)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
13 ;; any later version.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
14
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
15 ;; GNU Emacs is distributed in the hope that it will be useful,
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
18 ;; GNU General Public License for more details.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
19
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
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
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
24
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
25 ;; Author: TAKAHASHI Naoto <ntakahas@etl.go.jp>
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
26
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
27 ;;; Code:
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
28
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
29 (define-ccl-program ccl-encode-ethio-font
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
30 '(0
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
31 ;; In: R0:ethiopic (not checked)
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
32 ;; R1:position code 1
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
33 ;; R2:position code 2
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
34 ;; Out: R1:font code point 1
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
35 ;; R2:font code point 2
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
36 ((r1 -= 33)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
37 (r2 -= 33)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
38 (r1 *= 94)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
39 (r2 += r1)
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
40 (if (r2 < 256)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
41 (r1 = ?\x12)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
42 (if (r2 < 448)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
43 ((r1 = ?\x13) (r2 -= 256))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
44 ((r1 = ?\xfd) (r2 -= 208))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
45 ))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
46 "CCL program to encode an Ehitopic code to code point of Ehitopic font.")
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
47
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
48 (setq font-ccl-encoder-alist
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
49 (cons (cons "ethiopic" ccl-encode-ethio-font) font-ccl-encoder-alist))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
50
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
51 (register-input-method
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
52 "Ethiopic" '("quail-ethio" quail-use-package "quail/ethiopic"))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
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
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
57 (setq primary-language "Ethiopic")
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
58
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
59 (setq default-input-method '("Ethiopic" . "quail-ethio"))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
60
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
61 ;;
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
62 ;; key bindings
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
63 ;;
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
64 (define-key global-map [f4] 'sera-to-fidel-buffer)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
65 (define-key global-map [S-f4] 'sera-to-fidel-region)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
66 (define-key global-map [C-f4] 'sera-to-fidel-marker)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
67 (define-key global-map [f5] 'fidel-to-sera-buffer)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
68 (define-key global-map [S-f5] 'fidel-to-sera-region)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
69 (define-key global-map [C-f5] 'fidel-to-sera-marker)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
70 (define-key global-map [f6] 'ethio-modify-vowel)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
71 (define-key global-map [f7] 'ethio-replace-space)
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
72 (define-key global-map [f8] 'ethio-input-special-character)
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
73 (define-key global-map [S-f2] 'ethio-replace-space) ; as requested
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
74
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
75 (add-hook
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
76 'rmail-mode-hook
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
77 '(lambda ()
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
78 (define-key rmail-mode-map [C-f4] 'sera-to-fidel-mail)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
79 (define-key rmail-mode-map [C-f5] 'fidel-to-sera-mail)))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
80
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
81 (add-hook
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
82 'mail-mode-hook
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
83 '(lambda ()
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
84 (define-key mail-mode-map [C-f4] 'sera-to-fidel-mail)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
85 (define-key mail-mode-map [C-f5] 'fidel-to-sera-mail)))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
86 )
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
87
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
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
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
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
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
93
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
94 ;;; ethiopic.el ends here