Update copyright year to 2014 by running admin/update-copyright.
[emacs.git] / lisp / language / ethiopic.el
blobfab93eab8b7525beaabd9c07cf933f002fa9c5e0
1 ;;; ethiopic.el --- support for Ethiopic -*- coding: utf-8-emacs; -*-
3 ;; Copyright (C) 1997, 2001-2014 Free Software Foundation, Inc.
4 ;; Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
5 ;; 2005, 2006, 2007, 2008, 2009, 2010, 2011
6 ;; National Institute of Advanced Industrial Science and Technology (AIST)
7 ;; Registration Number H14PRO021
9 ;; Keywords: multilingual, Ethiopic
11 ;; This file is part of GNU Emacs.
13 ;; GNU Emacs is free software: you can redistribute it and/or modify
14 ;; it under the terms of the GNU General Public License as published by
15 ;; the Free Software Foundation, either version 3 of the License, or
16 ;; (at your option) any later version.
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.
23 ;; You should have received a copy of the GNU General Public License
24 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
26 ;; Author: TAKAHASHI Naoto <ntakahas@m17n.org>
28 ;;; Commentary:
30 ;;; Code:
32 (define-ccl-program ccl-encode-ethio-font
33 '(0
34 ;; In: R0:ethiopic (not checked)
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)
43 (if (r2 < 256)
44 (r1 = #x12)
45 (if (r2 < 448)
46 ((r1 = #x13) (r2 -= 256))
47 ((r1 = #xfd) (r2 -= 208))
48 ))))
49 "CCL program to encode an Ethiopic code to code point of Ethiopic font.")
51 (setq font-ccl-encoder-alist
52 (cons (cons (purecopy "ethiopic") ccl-encode-ethio-font) font-ccl-encoder-alist))
54 (set-language-info-alist
55 "Ethiopic" '((setup-function . setup-ethiopic-environment-internal)
56 (exit-function . exit-ethiopic-environment)
57 (charset ethiopic)
58 (coding-system utf-8-emacs)
59 (coding-priority utf-8-emacs)
60 (input-method . "ethiopic")
61 (features ethio-util)
62 (sample-text . "ፊደል")
63 (documentation .
64 "This language environment provides these function key bindings:
65 [f3] ethio-fidel-to-sera-buffer
66 [S-f3] ethio-fidel-to-sera-region
67 [C-f3] ethio-fidel-to-sera-marker
69 [f4] ethio-sera-to-fidel-buffer
70 [S-f4] ethio-sera-to-fidel-region
71 [C-f4] ethio-sera-to-fidel-marker
73 [S-f5] ethio-toggle-punctuation
74 [S-f6] ethio-modify-vowel
75 [S-f7] ethio-replace-space
77 [S-f9] ethio-replace-space
78 [C-f9] ethio-toggle-space"
79 )))
81 ;; For automatic composition
82 (aset composition-function-table ? 'ethio-composition-function)
83 (aset composition-function-table ?፟ 'ethio-composition-function)
85 (provide 'ethiopic)
87 ;;; ethiopic.el ends here