Merge from emacs-24; up to 2012-12-31T11:35:13Z!rudalics@gmx.at
[bpt/emacs.git] / lisp / language / ethiopic.el
CommitLineData
ada7cbe1 1;;; ethiopic.el --- support for Ethiopic -*- coding: utf-8-emacs; -*-
4ed46869 2
ab422c4d 3;; Copyright (C) 1997, 2001-2013 Free Software Foundation, Inc.
7976eda0 4;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
5df4f04c 5;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
eaa61218
KH
6;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H14PRO021
4ed46869
KH
8
9;; Keywords: multilingual, Ethiopic
10
11;; This file is part of GNU Emacs.
12
4936186e 13;; GNU Emacs is free software: you can redistribute it and/or modify
4ed46869 14;; it under the terms of the GNU General Public License as published by
4936186e
GM
15;; the Free Software Foundation, either version 3 of the License, or
16;; (at your option) any later version.
4ed46869
KH
17
18;; GNU Emacs is distributed in the hope that it will be useful,
19;; but WITHOUT ANY WARRANTY; without even the implied warranty of
20;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;; GNU General Public License for more details.
22
23;; You should have received a copy of the GNU General Public License
4936186e 24;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
60acfd15 25
fc3dc40c 26;; Author: TAKAHASHI Naoto <ntakahas@m17n.org>
4ed46869 27
e8af40ee
PJ
28;;; Commentary:
29
4ed46869
KH
30;;; Code:
31
32(define-ccl-program ccl-encode-ethio-font
33 '(0
60acfd15 34 ;; In: R0:ethiopic (not checked)
4ed46869
KH
35 ;; R1:position code 1
36 ;; R2:position code 2
37 ;; Out: R1:font code point 1
38 ;; R2:font code point 2
39 ((r1 -= 33)
40 (r2 -= 33)
41 (r1 *= 94)
42 (r2 += r1)
60acfd15 43 (if (r2 < 256)
de91bd8e 44 (r1 = #x12)
60acfd15 45 (if (r2 < 448)
de91bd8e
KH
46 ((r1 = #x13) (r2 -= 256))
47 ((r1 = #xfd) (r2 -= 208))
60acfd15 48 ))))
15e8ea5a 49 "CCL program to encode an Ethiopic code to code point of Ethiopic font.")
4ed46869
KH
50
51(setq font-ccl-encoder-alist
6bdad9ae 52 (cons (cons (purecopy "ethiopic") ccl-encode-ethio-font) font-ccl-encoder-alist))
4ed46869 53
4ed46869 54(set-language-info-alist
a564ccf9 55 "Ethiopic" '((setup-function . setup-ethiopic-environment-internal)
b3c357b6 56 (exit-function . exit-ethiopic-environment)
539c55ed 57 (charset ethiopic)
ada7cbe1
KH
58 (coding-system utf-8-emacs)
59 (coding-priority utf-8-emacs)
a564ccf9
KH
60 (input-method . "ethiopic")
61 (features ethio-util)
ada7cbe1 62 (sample-text . "ፊደል")
a1506d29 63 (documentation .
4c36be58 64"This language environment provides these function key bindings:
ada7cbe1
KH
65 [f3] ethio-fidel-to-sera-buffer
66 [S-f3] ethio-fidel-to-sera-region
67 [C-f3] ethio-fidel-to-sera-marker
68
69 [f4] ethio-sera-to-fidel-buffer
70 [S-f4] ethio-sera-to-fidel-region
71 [C-f4] ethio-sera-to-fidel-marker
72
73 [S-f5] ethio-toggle-punctuation
74 [S-f6] ethio-modify-vowel
75 [S-f7] ethio-replace-space
76
77 [S-f9] ethio-replace-space
78 [C-f9] ethio-toggle-space"
fc3dc40c 79)))
4ed46869 80
ada7cbe1
KH
81;; For automatic composition
82(aset composition-function-table ? 'ethio-composition-function)
de91bd8e 83(aset composition-function-table ?፟ 'ethio-composition-function)
ada7cbe1 84
41da80b1
DL
85(provide 'ethiopic)
86
4ed46869 87;;; ethiopic.el ends here