Merge from emacs-23
[bpt/emacs.git] / lisp / language / ethiopic.el
CommitLineData
ada7cbe1 1;;; ethiopic.el --- support for Ethiopic -*- coding: utf-8-emacs; -*-
4ed46869 2
5df4f04c 3;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
d4877ac1 4;; Free Software Foundation, Inc.
7976eda0 5;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
5df4f04c 6;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
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
4936186e 14;; GNU Emacs is free software: you can redistribute it and/or modify
4ed46869 15;; it under the terms of the GNU General Public License as published by
4936186e
GM
16;; the Free Software Foundation, either version 3 of the License, or
17;; (at your option) any later version.
4ed46869
KH
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
4936186e 25;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
60acfd15 26
fc3dc40c 27;; Author: TAKAHASHI Naoto <ntakahas@m17n.org>
4ed46869 28
e8af40ee
PJ
29;;; Commentary:
30
4ed46869
KH
31;;; Code:
32
33(define-ccl-program ccl-encode-ethio-font
34 '(0
60acfd15 35 ;; In: R0:ethiopic (not checked)
4ed46869
KH
36 ;; R1:position code 1
37 ;; R2:position code 2
38 ;; Out: R1:font code point 1
39 ;; R2:font code point 2
40 ((r1 -= 33)
41 (r2 -= 33)
42 (r1 *= 94)
43 (r2 += r1)
60acfd15 44 (if (r2 < 256)
de91bd8e 45 (r1 = #x12)
60acfd15 46 (if (r2 < 448)
de91bd8e
KH
47 ((r1 = #x13) (r2 -= 256))
48 ((r1 = #xfd) (r2 -= 208))
60acfd15 49 ))))
15e8ea5a 50 "CCL program to encode an Ethiopic code to code point of Ethiopic font.")
4ed46869
KH
51
52(setq font-ccl-encoder-alist
6bdad9ae 53 (cons (cons (purecopy "ethiopic") ccl-encode-ethio-font) font-ccl-encoder-alist))
4ed46869 54
4ed46869 55(set-language-info-alist
a564ccf9 56 "Ethiopic" '((setup-function . setup-ethiopic-environment-internal)
b3c357b6 57 (exit-function . exit-ethiopic-environment)
539c55ed 58 (charset ethiopic)
ada7cbe1
KH
59 (coding-system utf-8-emacs)
60 (coding-priority utf-8-emacs)
a564ccf9
KH
61 (input-method . "ethiopic")
62 (features ethio-util)
ada7cbe1 63 (sample-text . "ፊደል")
a1506d29 64 (documentation .
ada7cbe1
KH
65"This language envrironment provides these function key bindings:
66 [f3] ethio-fidel-to-sera-buffer
67 [S-f3] ethio-fidel-to-sera-region
68 [C-f3] ethio-fidel-to-sera-marker
69
70 [f4] ethio-sera-to-fidel-buffer
71 [S-f4] ethio-sera-to-fidel-region
72 [C-f4] ethio-sera-to-fidel-marker
73
74 [S-f5] ethio-toggle-punctuation
75 [S-f6] ethio-modify-vowel
76 [S-f7] ethio-replace-space
77
78 [S-f9] ethio-replace-space
79 [C-f9] ethio-toggle-space"
fc3dc40c 80)))
4ed46869 81
ada7cbe1
KH
82;; For automatic composition
83(aset composition-function-table ? 'ethio-composition-function)
de91bd8e 84(aset composition-function-table ?፟ 'ethio-composition-function)
ada7cbe1 85
41da80b1
DL
86(provide 'ethiopic)
87
cbee283d 88;; arch-tag: e81329d9-1286-43ba-92fd-54ce5c7b213c
4ed46869 89;;; ethiopic.el ends here