Merge from emacs--rel--22
[bpt/emacs.git] / lisp / language / ethiopic.el
CommitLineData
e8af40ee 1;;; ethiopic.el --- support for Ethiopic -*- coding: iso-2022-7bit; -*-
4ed46869 2
d7a0267c 3;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007
d4877ac1 4;; Free Software Foundation, Inc.
7976eda0 5;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
d7a0267c 6;; 2005, 2006, 2007
eaa61218
KH
7;; National Institute of Advanced Industrial Science and Technology (AIST)
8;; Registration Number H14PRO021
4ed46869
KH
9
10;; Keywords: multilingual, Ethiopic
11
12;; This file is part of GNU Emacs.
13
14;; GNU Emacs is free software; you can redistribute it and/or modify
15;; it under the terms of the GNU General Public License as published by
16;; the Free Software Foundation; either version 2, or (at your option)
17;; any later version.
18
19;; GNU Emacs is distributed in the hope that it will be useful,
20;; but WITHOUT ANY WARRANTY; without even the implied warranty of
21;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22;; GNU General Public License for more details.
23
24;; You should have received a copy of the GNU General Public License
e803d6bd 25;; along with GNU Emacs; see the file COPYING. If not, write to the
3a35cf56
LK
26;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
27;; Boston, MA 02110-1301, USA.
60acfd15 28
fc3dc40c 29;; Author: TAKAHASHI Naoto <ntakahas@m17n.org>
4ed46869 30
e8af40ee
PJ
31;;; Commentary:
32
4ed46869
KH
33;;; Code:
34
35(define-ccl-program ccl-encode-ethio-font
36 '(0
60acfd15 37 ;; In: R0:ethiopic (not checked)
4ed46869
KH
38 ;; R1:position code 1
39 ;; R2:position code 2
40 ;; Out: R1:font code point 1
41 ;; R2:font code point 2
42 ((r1 -= 33)
43 (r2 -= 33)
44 (r1 *= 94)
45 (r2 += r1)
60acfd15
KH
46 (if (r2 < 256)
47 (r1 = ?\x12)
48 (if (r2 < 448)
49 ((r1 = ?\x13) (r2 -= 256))
50 ((r1 = ?\xfd) (r2 -= 208))
51 ))))
15e8ea5a 52 "CCL program to encode an Ethiopic code to code point of Ethiopic font.")
4ed46869
KH
53
54(setq font-ccl-encoder-alist
60acfd15 55 (cons (cons "ethiopic" ccl-encode-ethio-font) font-ccl-encoder-alist))
4ed46869 56
4ed46869 57(set-language-info-alist
a564ccf9 58 "Ethiopic" '((setup-function . setup-ethiopic-environment-internal)
b3c357b6 59 (exit-function . exit-ethiopic-environment)
539c55ed
KH
60 (charset ethiopic)
61 (coding-system iso-2022-7bit)
62 (coding-priority iso-2022-7bit)
a564ccf9
KH
63 (input-method . "ethiopic")
64 (features ethio-util)
9afa6c35 65 (sample-text . "\e$(3$Q#U!.\e(B")
a1506d29 66 (documentation .
fc3dc40c
KH
67"This language envrironment provides these function key bindings
68 \(old bindings are shown in parentheses):
69 [f3] ethio-fidel-to-sera-buffer (f5)
70 [S-f3] ethio-fidel-to-sera-region (f5)
71 [C-f3] ethio-fidel-to-sera-mail-or-marker (f5)
72
73 [f4] ethio-sera-to-fidel-buffer (unchanged)
74 [S-f4] ethio-sera-to-fidel-region (unchanged)
75 [C-f4] ethio-sera-to-fidel-mail-or-marker (unchanged)
76
77 [S-f5] ethio-toggle-punctuation (f3)
78 [S-f6] ethio-modify-vowel (f6)
79 [S-f7] ethio-replace-space (f7)
80 [S-f8] ethio-input-special-character (f8)
81 [S-f9] ethio-replace-space (unchanged)
82 [C-f9] ethio-toggle-space (f2)"
83)))
4ed46869 84
41da80b1
DL
85(provide 'ethiopic)
86
ab5796a9 87;;; arch-tag: e81329d9-1286-43ba-92fd-54ce5c7b213c
4ed46869 88;;; ethiopic.el ends here