annotate lisp/language/ethio-util.el @ 18291:130a48e6cc13

(ffap-soft-value): Make this a function again; the macro version does intern-soft too early. Deleted XEmacs-specific code. (ffap-string-at-point-mode-alist): added "=" and "&" to the url syntax, as suggested by SJE. (ffap-read-file-or-url): fixed the HIST argument to completing-read (only visible in XEmacs?), as reported by Christoph Wedler <wedler@fmi.uni-passau.de>. (ffap-kpathsea-expand-path) New func, replaces ffap-add-subdirs, a first attempt at kpathsea emulation. Also convert "" to "." in path lists, for XEmacs. Suggestions from SJE. Added mouse-track support (but no binding), as suggested by MDB. Moved Emacs mouse bindings from "down-mouse" events to ordinary mouse events. (ffap-alist): added ffap-fortran-mode, as requested by MDB. Rewrote and merged XEmacs support, eliminating file ffap-xe.el. Modified ffap-other-frame to work in dedicated frames, fixing a bug reported by JENS. (ffap-menu-rescan): avoid modifying the buffer. Two bugs reported by Christoph Wedler <wedler@fmi.uni-passau.de>: (ffap-fixup-url): avoid autoloading through url-normalize-url. (ffap-read-file-or-url): for XEmacs, give extra HACK-HOMEDIR arg to `abbreviate-file-name'. (ffap-file-at-point): suppress errors from `ffap-alist'. (ffap-url-at-point): modified regexp to accept mail hostnames ending with a digit. Fixes bug report of SJE. (ffap-url-at-point): use higher level function (w3-view-this-url t) suggested by wmperry, instead of w3-zone-at/w3-zone-data or widget-at/widget-get. (ffap-url-at-point): modified to work with w3-version "WWW 2.3.64 1996/06/02 06:20:23" alpha, which uses the 'widget package rather than the old w3-zone-at. Bug was reported by JENS. Adopted comments and doc strings to Emacs coding conventions. Reorganized. Retired v18 support. (ffap-bindings): Offers a default installation. (ffap-string-at-point): Modified arguments. (ffap-gnus-hook): Updated for Gnus 5. (ffap-tex-init): Delayed initialization of `ffap-tex-path'. (ffap-dired): New entry in `ffap-alist'. (ffap-menu-rescan): May fontify the choices in buffer. (ffap-read-file-or-url): `PC-completion-as-file-name-predicate' used if available, to work with complete.el.
author Karl Heuer <kwzh@gnu.org>
date Wed, 18 Jun 1997 04:24:37 +0000
parents 73869115ae0a
children 6148a6f19ded
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17315
a3ca5e15c82a Fix the format of the first line.
Kenichi Handa <handa@m17n.org>
parents: 17314
diff changeset
1 ;;; ethio-util.el --- utilities for Ethiopic
17052
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
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
6 ;; Keywords: mule, multilingual, Ethiopic
17052
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
17993
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
29 ;;;###autoload
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
30 (defun setup-ethiopic-environment ()
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
31 "Setup multilingual environment for Ethiopic."
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
32 (interactive)
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
33 (setup-english-environment)
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
34 (setq primary-language "Ethiopic")
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
35
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
36 (setq default-input-method '("Ethiopic" . "quail-ethio"))
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
37
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
38 ;;
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
39 ;; key bindings
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
40 ;;
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
41 (define-key global-map [f4] 'sera-to-fidel-buffer)
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
42 (define-key global-map [S-f4] 'sera-to-fidel-region)
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
43 (define-key global-map [C-f4] 'sera-to-fidel-marker)
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
44 (define-key global-map [f5] 'fidel-to-sera-buffer)
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
45 (define-key global-map [S-f5] 'fidel-to-sera-region)
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
46 (define-key global-map [C-f5] 'fidel-to-sera-marker)
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
47 (define-key global-map [f6] 'ethio-modify-vowel)
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
48 (define-key global-map [f7] 'ethio-replace-space)
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
49 (define-key global-map [f8] 'ethio-input-special-character)
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
50 (define-key global-map [S-f2] 'ethio-replace-space) ; as requested
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
51
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
52 (add-hook
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
53 'rmail-mode-hook
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
54 '(lambda ()
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
55 (define-key rmail-mode-map [C-f4] 'sera-to-fidel-mail)
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
56 (define-key rmail-mode-map [C-f5] 'fidel-to-sera-mail)))
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
57
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
58 (add-hook
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
59 'mail-mode-hook
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
60 '(lambda ()
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
61 (define-key mail-mode-map [C-f4] 'sera-to-fidel-mail)
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
62 (define-key mail-mode-map [C-f5] 'fidel-to-sera-mail)))
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
63 )
73869115ae0a Most of setup-LANGUAGE-environment functions are
Kenichi Handa <handa@m17n.org>
parents: 17774
diff changeset
64
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
65 ;;
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
66 ;; ETHIOPIC UTILITY FUNCTIONS
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
67 ;;
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
68
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
69 ;; If the filename ends in ".sera", editing is done in fidel
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
70 ;; but file I/O is done in SERA.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
71 ;;
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
72 ;; If the filename ends in ".java", editing is done in fidel
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
73 ;; but file I/O is done in the \uXXXX style, where XXXX is
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
74 ;; the Unicode codepoint for the Ethiopic character.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
75 ;;
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
76 ;; If the filename ends in ".tex", editing is done in fidel
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
77 ;; but file I/O is done in EthioTeX format.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
78 ;;
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
79 ;; To automatically convert Ethiopic text to SERA format when sending mail,
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
80 ;; (add-hook 'mail-send-hook 'ethio-fidel-to-sera-mail)
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
81 ;;
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
82 ;; To automatically convert SERA format to Ethiopic when receiving mail,
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
83 ;; (add-hook 'rmail-show-message-hook 'ethio-sera-to-fidel-mail)
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
84 ;;
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
85 ;; To automatically convert Ethiopic text to SERA format when posting news,
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
86 ;; (add-hook 'news-inews-hook 'ethio-fidel-to-sera-mail)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
87
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
88 ;;
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
89 ;; users' preference
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
90 ;;
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
91
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
92 (defvar ethio-primary-language 'tigrigna
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
93 "*Symbol that defines the primary language in SERA --> FIDEL conversion.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
94 The value should be one of: `tigrigna', `amharic' or `english'.")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
95
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
96 (defvar ethio-secondary-language 'english
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
97 "*Symbol that defines the secondary language in SERA --> FIDEL conversion.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
98 The value should be one of: `tigrigna', `amharic' or `english'.")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
99
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
100 (defvar ethio-use-colon-for-colon nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
101 "*Non-nil means associate ASCII colon with Ethiopic colon.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
102 If nil, associate ASCII colon with Ethiopic word separator, i.e., two
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
103 vertically stacked dots. All SERA <--> FIDEL converters refer this
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
104 variable.")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
105
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
106 (defvar ethio-use-three-dot-question nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
107 "*Non-nil means associate ASCII question mark with Ethiopic old style question mark (three vertically stacked dots).
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
108 If nil, associate ASCII question mark with Ethiopic stylised question
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
109 mark. All SERA <--> FIDEL converters refer this variable.")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
110
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
111 (defvar ethio-quote-vowel-always nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
112 "*Non-nil means always put an apostrophe before an isolated vowel (except at word initial) in FIDEL --> SERA conversion.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
113 If nil, put an apostrophe only between a sixth-form consonant and an
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
114 isolated vowel.")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
115
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
116 (defvar ethio-W-sixth-always nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
117 "*Non-nil means convert the Wu-form of a 12-form consonant to \"W'\" instead of \"Wu\" in FIDEL --> SERA conversion.")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
118
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
119 (defvar ethio-numeric-reduction 0
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
120 "*Degree of reduction in converting Ethiopic digits into Arabic digits.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
121 Should be 0, 1 or 2.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
122 For example, ({10}{9}{100}{80}{7}) is converted into:
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
123 `10`9`100`80`7 if `ethio-numeric-reduction' is 0,
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
124 `109100807 if `ethio-numeric-reduction' is 1,
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
125 `10900807 if `ethio-numeric-reduction' is 2.")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
126
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
127 (defvar ethio-implicit-period-conversion t
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
128 "*Non-nil means replacing the Ethiopic dot at the end of an Ethiopic sentence
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
129 with an Ethiopic full stop.")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
130
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
131 (defvar ethio-java-save-lowercase nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
132 "*Non-nil means save Ethiopic characters in lowercase hex numbers to Java files.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
133 If nil, use uppercases.")
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
134
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
135 ;;
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
136 ;; SERA to FIDEL
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
137 ;;
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
138
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
139 (defconst ethio-sera-to-fidel-table
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
140 [
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
141 nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
142 nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
143 ;;; SP
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
144 (" "
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
145 (?: (if ethio-use-colon-for-colon " $(3$l(B" "$(3$h(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
146 (32 (if ethio-use-colon-for-colon " $(3$l(B " "$(3$h(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
147 (?- " $(3$m(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
148 (?: " $(3$i(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
149 (?| (if ethio-use-colon-for-colon " $(3$l(B|" " $(3$h(B|")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
150 (?: " $(3$o(B"))))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
151
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
152 ;;; ! " # $ % & '
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
153 nil nil nil nil nil nil ("" (?' "$(3%s(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
154 ;;; ( ) * + , - .
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
155 nil nil nil nil ("$(3$j(B") ("-" (?: "$(3$l(B")) ("$(3%u(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
156 ;;; / 0 1 2 3 4 5 6 7 8 9
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
157 nil nil nil nil nil nil nil nil nil nil nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
158 ;;; :
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
159 ((if ethio-use-colon-for-colon "$(3$l(B" "$(3$h(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
160 (32 (if ethio-use-colon-for-colon "$(3$l(B " "$(3$h(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
161 (?- "$(3$m(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
162 (?: "$(3$i(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
163 (?| (if ethio-use-colon-for-colon "$(3$l(B|" "$(3$h(B|")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
164 (?: "$(3$o(B")))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
165 ;;; ; < = >
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
166 ("$(3$k(B") ("<" (?< "$(3%v(B")) nil (">" (?> "$(3%w(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
167 ;;; ?
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
168 ((if ethio-use-three-dot-question "$(3$n(B" "$(3%x(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
169 ;;; @
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
170 nil
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
171 ;;; A
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
172 ("$(3"f(B" (?2 "$(3#8(B"))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
173 ;;; B
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
174 ("$(3"((B" (?e "$(3"#(B") (?u "$(3"$(B") (?i "$(3"%(B") (?a "$(3"&(B") (?E "$(3"'(B") (?o "$(3")(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
175 (?W "$(3%b(B" (?e "$(3%2(B") (?u "$(3%b(B") (?i "$(3%B(B") (?a "$(3"*(B") (?E "$(3%R(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
176 ;;; C
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
177 ("$(3$4(B" (?e "$(3$/(B") (?u "$(3$0(B") (?i "$(3$1(B") (?a "$(3$2(B") (?E "$(3$3(B") (?o "$(3$5(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
178 (?W "$(3$6(B" (?a "$(3$6(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
179 (?e "$(3$4%n(B") (?u "$(3$4%r(B") (?i "$(3$4%o(B") (?E "$(3$4%q(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
180 ;;; D
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
181 ("$(3#b(B" (?e "$(3#](B") (?u "$(3#^(B") (?i "$(3#_(B") (?a "$(3#`(B") (?E "$(3#a(B") (?o "$(3#c(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
182 (?W "$(3#d(B" (?a "$(3#d(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
183 (?e "$(3#b%n(B") (?u "$(3#b%r(B") (?i "$(3#b%o(B") (?E "$(3#b%q(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
184 ;;; E
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
185 ("$(3"g(B" (?2 "$(3#9(B"))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
186 ;;; F
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
187 ("$(3$T(B" (?e "$(3$O(B") (?u "$(3$P(B") (?i "$(3$Q(B") (?a "$(3$R(B") (?E "$(3$S(B") (?o "$(3$U(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
188 (?W "$(3%d(B" (?e "$(3%4(B") (?u "$(3%d(B") (?i "$(3%D(B") (?a "$(3$V(B") (?E "$(3%T(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
189 (?Y "$(3$a(B" (?a "$(3$a(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
190 ;;; G
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
191 ("$(3$$(B" (?e "$(3#}(B") (?u "$(3#~(B") (?i "$(3$!(B") (?a "$(3$"(B") (?E "$(3$#(B") (?o "$(3$%(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
192 (?W "$(3%c(B" (?e "$(3%3(B") (?u "$(3%c(B") (?i "$(3%C(B") (?a "$(3$&(B") (?E "$(3%S(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
193 ;;; H
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
194 ("$(3!6(B" (?e "$(3!1(B") (?u "$(3!2(B") (?i "$(3!3(B") (?a "$(3!4(B") (?E "$(3!5(B") (?o "$(3!7(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
195 (?W "$(3!8(B" (?a "$(3!8(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
196 (?e "$(3!6%n(B") (?u "$(3!6%r(B") (?i "$(3!6%o(B") (?E "$(3!6%q(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
197 ;;; I
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
198 ("$(3"h(B" (?2 "$(3#:(B"))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
199 ;;; J
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
200 ("$(3#j(B" (?e "$(3#e(B") (?u "$(3#f(B") (?i "$(3#g(B") (?a "$(3#h(B") (?E "$(3#i(B") (?o "$(3#k(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
201 (?W "$(3#l(B" (?a "$(3#l(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
202 (?e "$(3#j%n(B") (?u "$(3#j%r(B") (?i "$(3#j%o(B") (?E "$(3#j%q(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
203 ;;; K
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
204 ("$(3#"(B" (?e "$(3"{(B") (?u "$(3"|(B") (?i "$(3"}(B") (?a "$(3"~(B") (?E "$(3#!(B") (?o "$(3##(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
205 (?W "$(3#*(B" (?e "$(3#%(B") (?u "$(3#*(B") (?i "$(3#'(B") (?a "$(3#((B") (?E "$(3#)(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
206 ;;; L
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
207 ("$(3!.(B" (?e "$(3!)(B") (?u "$(3!*(B") (?i "$(3!+(B") (?a "$(3!,(B") (?E "$(3!-(B") (?o "$(3!/(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
208 (?W "$(3!0(B" (?a "$(3!0(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
209 (?e "$(3!.%n(B") (?u "$(3!.%r(B") (?i "$(3!.%o(B") (?E "$(3!.%q(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
210 ;;; M
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
211 ("$(3!>(B" (?e "$(3!9(B") (?u "$(3!:(B") (?i "$(3!;(B") (?a "$(3!<(B") (?E "$(3!=(B") (?o "$(3!?(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
212 (?W "$(3%a(B" (?e "$(3%1(B") (?u "$(3%a(B") (?i "$(3%A(B") (?a "$(3!@(B") (?E "$(3%Q(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
213 (?Y "$(3$_(B" (?a "$(3$_(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
214 ;;; N
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
215 ("$(3"`(B" (?e "$(3"[(B") (?u "$(3"\(B") (?i "$(3"](B") (?a "$(3"^(B") (?E "$(3"_(B") (?o "$(3"a(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
216 (?W "$(3"b(B" (?a "$(3"b(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
217 (?e "$(3"`%n(B") (?u "$(3"`%r(B") (?i "$(3"`%o(B") (?E "$(3"`%q(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
218 ;;; O
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
219 ("$(3"i(B" (?2 "$(3#;(B"))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
220 ;;; P
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
221 ("$(3$<(B" (?e "$(3$7(B") (?u "$(3$8(B") (?i "$(3$9(B") (?a "$(3$:(B") (?E "$(3$;(B") (?o "$(3$=(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
222 (?W "$(3$>(B" (?a "$(3$>(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
223 (?e "$(3$<%n(B") (?u "$(3$<%r(B") (?i "$(3$<%o(B") (?E "$(3$<%q(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
224 ;;; Q
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
225 ("$(3!v(B" (?e "$(3!q(B") (?u "$(3!r(B") (?i "$(3!s(B") (?a "$(3!t(B") (?E "$(3!u(B") (?o "$(3!w(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
226 (?W "$(3!~(B" (?e "$(3!y(B") (?u "$(3!~(B") (?i "$(3!{(B") (?a "$(3!|(B") (?E "$(3!}(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
227 ;;; R
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
228 ("$(3!N(B" (?e "$(3!I(B") (?u "$(3!J(B") (?i "$(3!K(B") (?a "$(3!L(B") (?E "$(3!M(B") (?o "$(3!O(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
229 (?W "$(3!P(B" (?a "$(3!P(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
230 (?e "$(3!N%n(B") (?u "$(3!N%r(B") (?i "$(3!N%o(B") (?E "$(3!N%q(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
231 (?Y "$(3$`(B" (?a "$(3$`(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
232 ;;; S
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
233 ("$(3$D(B" (?e "$(3$?(B") (?u "$(3$@(B") (?i "$(3$A(B") (?a "$(3$B(B") (?E "$(3$C(B") (?o "$(3$E(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
234 (?W "$(3$F(B" (?a "$(3$F(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
235 (?e "$(3$D%n(B") (?u "$(3$D%r(B") (?i "$(3$D%o(B") (?E "$(3$D%q(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
236 (?2 "$(3$L(B"
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
237 (?e "$(3$G(B") (?u "$(3$H(B") (?i "$(3$I(B") (?a "$(3$J(B") (?E "$(3$K(B") (?o "$(3$M(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
238 (?W "$(3$F(B" (?a "$(3$F(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
239 (?e "$(3$L%n(B") (?u "$(3$L%r(B") (?i "$(3$L%o(B") (?E "$(3$L%q(B"))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
240 ;;; T
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
241 ("$(3$,(B" (?e "$(3$'(B") (?u "$(3$((B") (?i "$(3$)(B") (?a "$(3$*(B") (?E "$(3$+(B") (?o "$(3$-(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
242 (?W "$(3$.(B" (?a "$(3$.(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
243 (?e "$(3$,%n(B") (?u "$(3$,%r(B") (?i "$(3$,%o(B") (?E "$(3$,%q(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
244 ;;; U
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
245 ("$(3"d(B" (?2 "$(3#6(B"))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
246 ;;; V
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
247 ("$(3"0(B" (?e "$(3"+(B") (?u "$(3",(B") (?i "$(3"-(B") (?a "$(3".(B") (?E "$(3"/(B") (?o "$(3"1(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
248 (?W "$(3"2(B" (?a "$(3"2(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
249 (?e "$(3"0%n(B") (?u "$(3"0%r(B") (?i "$(3"0%o(B") (?E "$(3"0%q(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
250 ;;; W
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
251 ("$(3%r(B" (?e "$(3%n(B") (?u "$(3%r(B") (?i "$(3%o(B") (?a "$(3%p(B") (?E "$(3%q(B"))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
252 ;;; X
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
253 ("$(3%N(B" (?e "$(3%I(B") (?u "$(3%J(B") (?i "$(3%K(B") (?a "$(3%L(B") (?E "$(3%M(B") (?o "$(3%O(B"))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
254 ;;; Y
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
255 ("$(3#R(B" (?e "$(3#M(B") (?u "$(3#N(B") (?i "$(3#O(B") (?a "$(3#P(B") (?E "$(3#Q(B") (?o "$(3#S(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
256 (?W "$(3#T(B" (?a "$(3#T(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
257 (?e "$(3#R%n(B") (?u "$(3#R%r(B") (?i "$(3#R%o(B") (?E "$(3#R%q(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
258 ;;; Z
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
259 ("$(3#J(B" (?e "$(3#E(B") (?u "$(3#F(B") (?i "$(3#G(B") (?a "$(3#H(B") (?E "$(3#I(B") (?o "$(3#K(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
260 (?W "$(3#L(B" (?a "$(3#L(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
261 (?e "$(3#J%n(B") (?u "$(3#J%r(B") (?i "$(3#J%o(B") (?E "$(3#J%q(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
262 ;;; [ \ ] ^ _
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
263 nil nil nil nil nil
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
264 ;;; `
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
265 (""
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
266 (?: "$(3$h(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
267 (?? (if ethio-use-three-dot-question "$(3%x(B" "$(3$n(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
268 (?! "$(3%t(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
269 (?e "$(3#5(B") (?u "$(3#6(B") (?U "$(3#6(B") (?i "$(3#7(B") (?a "$(3#8(B") (?A "$(3#8(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
270 (?E "$(3#9(B") (?I "$(3#:(B") (?o "$(3#;(B") (?O "$(3#;(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
271 (?g "$(3%^(B"
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
272 (?e "$(3%Y(B") (?u "$(3%Z(B") (?i "$(3%[(B") (?a "$(3%\(B") (?E "$(3%](B") (?o "$(3%_(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
273 (?h "$(3"H(B"
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
274 (?e "$(3"C(B") (?u "$(3"D(B") (?i "$(3"E(B") (?a "$(3"F(B") (?E "$(3"G(B") (?o "$(3"I(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
275 (?W "$(3"P(B" (?e "$(3"K(B") (?u "$(3"P(B") (?i "$(3"M(B") (?a "$(3"N(B") (?E "$(3"O(B")))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
276 (?k "$(3%>(B"
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
277 (?e "$(3%9(B") (?u "$(3%:(B") (?i "$(3%;(B") (?a "$(3%<(B") (?E "$(3%=(B") (?o "$(3%?(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
278 (?s "$(3!F(B"
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
279 (?e "$(3!A(B") (?u "$(3!B(B") (?i "$(3!C(B") (?a "$(3!D(B") (?E "$(3!E(B") (?o "$(3!G(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
280 (?W "$(3!H(B" (?a "$(3!H(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
281 (?e "$(3!F%n(B") (?u "$(3!F%r(B") (?i "$(3!F%o(B") (?E "$(3!F%q(B")))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
282 (?S "$(3$L(B"
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
283 (?e "$(3$G(B") (?u "$(3$H(B") (?i "$(3$I(B") (?a "$(3$J(B") (?E "$(3$K(B") (?o "$(3$M(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
284 (?W "$(3$F(B" (?a "$(3$F(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
285 (?e "$(3$L%n(B") (?u "$(3$L%r(B") (?i "$(3$L%o(B") (?E "$(3$L%q(B")))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
286 (?q "$(3%.(B" (?e "$(3%)(B") (?u "$(3%*(B") (?i "$(3%+(B") (?a "$(3%,(B") (?E "$(3%-(B") (?o "$(3%/(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
287 ;;; a
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
288 ("$(3"f(B" (?2 "$(3#8(B"))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
289 ;;; b
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
290 ("$(3"((B" (?e "$(3"#(B") (?u "$(3"$(B") (?i "$(3"%(B") (?a "$(3"&(B") (?E "$(3"'(B") (?o "$(3")(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
291 (?W "$(3%b(B" (?e "$(3%2(B") (?u "$(3%b(B") (?i "$(3%B(B") (?a "$(3"*(B") (?E "$(3%R(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
292 ;;; c
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
293 ("$(3"@(B" (?e "$(3";(B") (?u "$(3"<(B") (?i "$(3"=(B") (?a "$(3">(B") (?E "$(3"?(B") (?o "$(3"A(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
294 (?W "$(3"B(B" (?a "$(3"B(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
295 (?e "$(3"@%n(B") (?u "$(3"@%r(B") (?i "$(3"@%o(B") (?E "$(3"@%q(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
296 ;;; d
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
297 ("$(3#Z(B" (?e "$(3#U(B") (?u "$(3#V(B") (?i "$(3#W(B") (?a "$(3#X(B") (?E "$(3#Y(B") (?o "$(3#[(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
298 (?W "$(3#\(B" (?a "$(3#\(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
299 (?e "$(3#Z%o(B") (?u "$(3#Z%r(B") (?i "$(3#Z%p(B") (?E "$(3#Z%q(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
300 ;;; e
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
301 ("$(3"c(B" (?2 "$(3#5(B") (?a "$(3"j(B"))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
302 ;;; f
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
303 ("$(3$T(B" (?e "$(3$O(B") (?u "$(3$P(B") (?i "$(3$Q(B") (?a "$(3$R(B") (?E "$(3$S(B") (?o "$(3$U(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
304 (?W "$(3%d(B" (?e "$(3%4(B") (?u "$(3%d(B") (?i "$(3%D(B") (?a "$(3$V(B") (?E "$(3%T(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
305 (?Y "$(3$a(B" (?a "$(3$a(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
306 ;;; g
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
307 ("$(3#r(B" (?e "$(3#m(B") (?u "$(3#n(B") (?i "$(3#o(B") (?a "$(3#p(B") (?E "$(3#q(B") (?o "$(3#s(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
308 (?W "$(3#z(B" (?e "$(3#u(B") (?u "$(3#z(B") (?i "$(3#w(B") (?a "$(3#x(B") (?E "$(3#y(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
309 (?2 "$(3%^(B" (?e "$(3%Y(B") (?u "$(3%Z(B") (?i "$(3%[(B") (?a "$(3%\(B") (?E "$(3%](B") (?o "$(3%_(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
310 ;;; h
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
311 ("$(3!&(B" (?e "$(3!!(B") (?u "$(3!"(B") (?i "$(3!#(B") (?a "$(3!$(B") (?E "$(3!%(B") (?o "$(3!'(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
312 (?W "$(3"P(B" (?e "$(3"K(B") (?u "$(3"P(B") (?i "$(3"M(B") (?a "$(3"N(B") (?E "$(3"O(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
313 (?2 "$(3"H(B" (?e "$(3"C(B") (?u "$(3"D(B") (?i "$(3"E(B") (?a "$(3"F(B") (?E "$(3"G(B") (?o "$(3"I(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
314 (?W "$(3"P(B" (?e "$(3"K(B") (?u "$(3"P(B") (?i "$(3"M(B") (?a "$(3"N(B") (?E "$(3"O(B"))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
315 ;;; i
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
316 ("$(3"e(B" (?2 "$(3#7(B"))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
317 ;;; j
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
318 ("$(3#j(B" (?e "$(3#e(B") (?u "$(3#f(B") (?i "$(3#g(B") (?a "$(3#h(B") (?E "$(3#i(B") (?o "$(3#k(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
319 (?W "$(3#l(B" (?a "$(3#l(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
320 (?e "$(3#j%n(B") (?u "$(3#j%r(B") (?i "$(3#j%o(B") (?E "$(3#j%q(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
321 ;;; k
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
322 ("$(3"p(B" (?e "$(3"k(B") (?u "$(3"l(B") (?i "$(3"m(B") (?a "$(3"n(B") (?E "$(3"o(B") (?o "$(3"q(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
323 (?W "$(3"x(B" (?e "$(3"s(B") (?u "$(3"x(B") (?i "$(3"u(B") (?a "$(3"v(B") (?E "$(3"w(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
324 (?2 "$(3%>(B" (?e "$(3%9(B") (?u "$(3%:(B") (?i "$(3%;(B") (?a "$(3%<(B") (?E "$(3%=(B") (?o "$(3%?(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
325 ;;; l
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
326 ("$(3!.(B" (?e "$(3!)(B") (?u "$(3!*(B") (?i "$(3!+(B") (?a "$(3!,(B") (?E "$(3!-(B") (?o "$(3!/(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
327 (?W "$(3!0(B" (?a "$(3!0(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
328 (?e "$(3!.%n(B") (?u "$(3!.%r(B") (?i "$(3!.%o(B") (?E "$(3!.%q(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
329 ;;; m
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
330 ("$(3!>(B" (?e "$(3!9(B") (?u "$(3!:(B") (?i "$(3!;(B") (?a "$(3!<(B") (?E "$(3!=(B") (?o "$(3!?(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
331 (?W "$(3%a(B" (?e "$(3%1(B") (?u "$(3%a(B") (?i "$(3%A(B") (?a "$(3!@(B") (?E "$(3%Q(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
332 (?Y "$(3$_(B" (?a "$(3$_(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
333 ;;; n
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
334 ("$(3"X(B" (?e "$(3"S(B") (?u "$(3"T(B") (?i "$(3"U(B") (?a "$(3"V(B") (?E "$(3"W(B") (?o "$(3"Y(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
335 (?W "$(3"Z(B" (?a "$(3"Z(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
336 (?e "$(3"X%n(B") (?u "$(3"X%r(B") (?i "$(3"X%o(B") (?E "$(3"X%q(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
337 ;;; o
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
338 ("$(3"i(B" (?2 "$(3#;(B"))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
339 ;;; p
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
340 ("$(3$\(B" (?e "$(3$W(B") (?u "$(3$X(B") (?i "$(3$Y(B") (?a "$(3$Z(B") (?E "$(3$[(B") (?o "$(3$](B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
341 (?W "$(3%e(B" (?e "$(3%5(B") (?u "$(3%e(B") (?i "$(3%E(B") (?a "$(3$^(B") (?E "$(3%U(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
342 ;;; q
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
343 ("$(3!f(B" (?e "$(3!a(B") (?u "$(3!b(B") (?i "$(3!c(B") (?a "$(3!d(B") (?E "$(3!e(B") (?o "$(3!g(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
344 (?W "$(3!n(B" (?e "$(3!i(B") (?u "$(3!n(B") (?i "$(3!k(B") (?a "$(3!l(B") (?E "$(3!m(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
345 (?2 "$(3%.(B" (?e "$(3%)(B") (?u "$(3%*(B") (?i "$(3%+(B") (?a "$(3%,(B") (?E "$(3%-(B") (?o "$(3%/(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
346 ;;; r
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
347 ("$(3!N(B" (?e "$(3!I(B") (?u "$(3!J(B") (?i "$(3!K(B") (?a "$(3!L(B") (?E "$(3!M(B") (?o "$(3!O(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
348 (?W "$(3!P(B" (?a "$(3!P(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
349 (?e "$(3!N%n(B") (?u "$(3!N%r(B") (?i "$(3!N%o(B") (?E "$(3!N%q(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
350 (?Y "$(3$`(B" (?a "$(3$`(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
351 ;;; s
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
352 ("$(3!V(B" (?e "$(3!Q(B") (?u "$(3!R(B") (?i "$(3!S(B") (?a "$(3!T(B") (?E "$(3!U(B") (?o "$(3!W(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
353 (?W "$(3!X(B" (?a "$(3!X(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
354 (?e "$(3!V%n(B") (?u "$(3!V%r(B") (?i "$(3!V%o(B") (?E "$(3!V%q(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
355 (?2 "$(3!F(B" (?e "$(3!A(B") (?u "$(3!B(B") (?i "$(3!C(B") (?a "$(3!D(B") (?E "$(3!E(B") (?o "$(3!G(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
356 (?W "$(3!H(B" (?a "$(3!H(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
357 (?e "$(3!F%n(B") (?u "$(3!F%r(B") (?i "$(3!F%o(B") (?E "$(3!F%q(B"))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
358 ;;; t
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
359 ("$(3"8(B" (?e "$(3"3(B") (?u "$(3"4(B") (?i "$(3"5(B") (?a "$(3"6(B") (?E "$(3"7(B") (?o "$(3"9(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
360 (?W "$(3":(B" (?a "$(3":(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
361 (?e "$(3"8%n(B") (?u "$(3"8%r(B") (?i "$(3"8%o(B") (?E "$(3"8%q(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
362 ;;; u
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
363 ("$(3"d(B" (?2 "$(3#6(B"))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
364 ;;; v
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
365 ("$(3"0(B" (?e "$(3"+(B") (?u "$(3",(B") (?i "$(3"-(B") (?a "$(3".(B") (?E "$(3"/(B") (?o "$(3"1(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
366 (?W "$(3"2(B" (?a "$(3"2(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
367 (?e "$(3"0%n(B") (?u "$(3"0%r(B") (?i "$(3"0%o(B") (?E "$(3"0%q(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
368 ;;; w
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
369 ("$(3#2(B" (?e "$(3#-(B") (?u "$(3#.(B") (?i "$(3#/(B") (?a "$(3#0(B") (?E "$(3#1(B") (?o "$(3#3(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
370 (?W "$(3%p(B" (?e "$(3%n(B") (?u "$(3%r(B") (?i "$(3%o(B") (?a "$(3%p(B") (?E "$(3%q(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
371 ;;; x
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
372 ("$(3!^(B" (?e "$(3!Y(B") (?u "$(3!Z(B") (?i "$(3![(B") (?a "$(3!\(B") (?E "$(3!](B") (?o "$(3!_(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
373 (?W "$(3!`(B" (?a "$(3!`(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
374 (?e "$(3!^%n(B") (?u "$(3!^%r(B") (?i "$(3!^%o(B") (?E "$(3!^%q(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
375 ;;; y
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
376 ("$(3#R(B" (?e "$(3#M(B") (?u "$(3#N(B") (?i "$(3#O(B") (?a "$(3#P(B") (?E "$(3#Q(B") (?o "$(3#S(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
377 (?W "$(3#T(B" (?a "$(3#T(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
378 (?e "$(3#R%n(B") (?u "$(3#R%r(B") (?i "$(3#R%o(B") (?E "$(3#R%q(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
379 ;;; z
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
380 ("$(3#B(B" (?e "$(3#=(B") (?u "$(3#>(B") (?i "$(3#?(B") (?a "$(3#@(B") (?E "$(3#A(B") (?o "$(3#C(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
381 (?W "$(3#D(B" (?a "$(3#D(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
382 (?e "$(3#B%n(B") (?u "$(3#B%r(B") (?i "$(3#B%o(B") (?E "$(3#B%q(B")))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
383 ;;; { | } ~ DEL
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
384 nil nil nil nil nil
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
385 ])
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
386
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
387 ;;;###autoload
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
388 (defun ethio-sera-to-fidel-region (beg end &optional secondary force)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
389 "Convert the characters in region from SERA to FIDEL.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
390 The variable `ethio-primary-language' specifies the primary language
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
391 and `ethio-secondary-language' specifies the secondary.
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
392
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
393 If the 3rd parameter SECONDARY is given and non-nil, assume the region
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
394 begins begins with the secondary language; otherwise with the primary
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
395 language.
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
396
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
397 If the 4th parameter FORCE is given and non-nil, perform conversion
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
398 even if the buffer is read-only.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
399
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
400 See also the descriptions of the variables
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
401 `ethio-use-colen-for-colon' and
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
402 `ethio-use-three-dot-question'."
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
403
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
404 (interactive "r\nP")
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
405 (save-restriction
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
406 (narrow-to-region beg end)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
407 (ethio-sera-to-fidel-buffer secondary force)))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
408
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
409 ;;;###autoload
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
410 (defun ethio-sera-to-fidel-buffer (&optional secondary force)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
411 "Convert the current buffer from SERA to FIDEL.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
412
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
413 The variable `ethio-primary-language' specifies the primary
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
414 language and `ethio-secondary-language' specifies the secondary.
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
415
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
416 If the 1st optional parameter SECONDARY is non-nil, assume the buffer
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
417 begins with the secondary language; otherwise with the primary
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
418 language.
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
419
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
420 If the 2nd optional parametr FORCE is non-nil, perform conversion even if the
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
421 buffer is read-only.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
422
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
423 See also the descriptions of the variables
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
424 `ethio-use-colen-for-colon' and
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
425 `ethio-use-three-dot-question'."
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
426
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
427 (interactive "P")
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
428
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
429 (if (and buffer-read-only
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
430 (not force)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
431 (not (y-or-n-p "Buffer is read-only. Force to convert? ")))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
432 (error ""))
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
433
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
434 (let ((ethio-primary-language ethio-primary-language)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
435 (ethio-secondary-language ethio-secondary-language)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
436 (ethio-use-colon-for-colon ethio-use-colon-for-colon)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
437 (ethio-use-three-dot-question ethio-use-three-dot-question)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
438 ;; The above four variables may be changed temporary
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
439 ;; by tilde escapes during conversion. So we bind them to other
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
440 ;; variables but of the same names.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
441 (buffer-read-only nil)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
442 (case-fold-search nil)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
443 current-language
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
444 next-language)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
445
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
446 (setq current-language
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
447 (if secondary
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
448 ethio-secondary-language
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
449 ethio-primary-language))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
450
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
451 (goto-char (point-min))
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
452
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
453 (while (not (eobp))
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
454 (setq next-language
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
455 (cond
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
456 ((eq current-language 'english)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
457 (ethio-sera-to-fidel-english))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
458 ((eq current-language 'amharic)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
459 (ethio-sera-to-fidel-ethio 'amharic))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
460 ((eq current-language 'tigrigna)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
461 (ethio-sera-to-fidel-ethio 'tigrigna))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
462 (t ; we don't know what to do
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
463 (ethio-sera-to-fidel-english))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
464
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
465 (setq current-language
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
466 (cond
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
467
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
468 ;; when language tag is explicitly specified
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
469 ((not (eq next-language 'toggle))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
470 next-language)
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
471
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
472 ;; found a toggle in a primary language section
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
473 ((eq current-language ethio-primary-language)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
474 ethio-secondary-language)
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
475
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
476 ;; found a toggle in a secondary, third, fourth, ...
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
477 ;; language section
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
478 (t
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
479 ethio-primary-language))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
480
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
481 ;; If ethio-implicit-period-conversion is non-nil, the
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
482 ;; Ethiopic dot "$(3%u(B" at the end of an Ethiopic sentence is
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
483 ;; replaced with the Ethiopic full stop "$(3$i(B".
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
484 (if ethio-implicit-period-conversion
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
485 (progn
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
486 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
487 (while (re-search-forward "\\([$(3!!(B-$(3$a%)(B-$(3%e%n(B-$(3%r%s(B]\\)$(3%u(B\\([ \t]\\)"
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
488 nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
489 (replace-match "\\1$(3$i(B\\2"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
490 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
491 (while (re-search-forward "\\([$(3!!(B-$(3$a%)(B-$(3%e%n(B-$(3%r%s(B]\\)$(3%u(B$" nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
492 (replace-match "\\1$(3$i(B"))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
493
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
494 ;; gemination
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
495 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
496 (while (re-search-forward "\\ce$(3%s(B" nil 0)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
497 (compose-region
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
498 (save-excursion (backward-char 2) (point))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
499 (point)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
500 ))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
501
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
502 (defun ethio-sera-to-fidel-english nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
503 "Handle English section in SERA to FIDEL conversion.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
504 Conversion stops when a language switch is found. Then delete that
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
505 switch and return the name of the new language as a symbol."
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
506 (let ((new-language nil))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
507
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
508 (while (and (not (eobp)) (null new-language))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
509 (cond
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
510
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
511 ;; if no more "\", nothing to do.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
512 ((not (search-forward "\\" nil 0)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
513
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
514 ;; hereafter point is put after a "\".
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
515 ;; first delete that "\", then check the following chars
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
516
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
517 ;; "\\" : leave the second "\"
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
518 ((progn
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
519 (delete-backward-char 1)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
520 (= (following-char) ?\\ ))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
521 (forward-char 1))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
522
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
523 ;; "\ " : delete the following " "
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
524 ((= (following-char) 32)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
525 (delete-char 1)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
526 (setq new-language 'toggle))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
527
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
528 ;; a language flag
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
529 ((setq new-language (ethio-process-language-flag)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
530
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
531 ;; just a "\" : not special sequence.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
532 (t
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
533 (setq new-language 'toggle))))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
534
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
535 new-language))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
536
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
537 (defun ethio-sera-to-fidel-ethio (lang)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
538 "Handle Ethiopic section in SERA to FIDEL conversion.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
539 Conversion stops when a language switch is found. Then delete that
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
540 switch and return the name of the new language as a symbol.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
541
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
542 The parameter LANG (symbol, either `amharic' or `tigrigna') affects
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
543 the conversion of \"a\"."
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
544
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
545 (let ((new-language nil)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
546 (verbatim nil)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
547 start table table2 ch)
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
548
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
549 (setcar (aref ethio-sera-to-fidel-table ?a)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
550 (if (eq lang 'tigrigna) "$(3"f(B" "$(3"c(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
551
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
552 (while (and (not (eobp)) (null new-language))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
553 (setq ch (following-char))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
554 (cond
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
555
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
556 ;; skip from "<" to ">" (or from "&" to ";") if in w3-mode
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
557 ((and (boundp 'sera-being-called-by-w3)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
558 sera-being-called-by-w3
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
559 (or (= ch ?<) (= ch ?&)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
560 (search-forward (if (= ch ?<) ">" ";")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
561 nil 0))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
562
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
563 ;; leave non-ASCII characters as they are
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
564 ((>= ch 128)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
565 (forward-char 1))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
566
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
567 ;; ethiopic digits
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
568 ((looking-at "`[1-9][0-9]*")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
569 (delete-char 1)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
570 (ethio-convert-digit))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
571
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
572 ;; if not seeing a "\", do sera to fidel conversion
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
573 ((/= ch ?\\ )
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
574 (setq start (point))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
575 (forward-char 1)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
576 (setq table (aref ethio-sera-to-fidel-table ch))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
577 (while (setq table2 (cdr (assoc (following-char) table)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
578 (setq table table2)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
579 (forward-char 1))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
580 (if (setq ch (car table))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
581 (progn
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
582 (delete-region start (point))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
583 (if (stringp ch)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
584 (insert ch)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
585 (insert (eval ch))))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
586
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
587 ;; if control reaches here, we must be looking at a "\"
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
588
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
589 ;; verbatim mode
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
590 (verbatim
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
591 (if (looking-at "\\\\~! ?")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
592
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
593 ;; "\~!" or "\~! ". switch to non-verbatim mode
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
594 (progn
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
595 (replace-match "")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
596 (setq verbatim nil))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
597
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
598 ;; "\" but not "\~!" nor "\~! ". skip the current "\".
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
599 (forward-char 1)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
600
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
601 ;; hereafter, non-verbatim mode and looking at a "\"
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
602 ;; first delete that "\", then check the following chars.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
603
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
604 ;; "\ " : delete the following " "
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
605 ((progn
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
606 (delete-char 1)
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
607 (setq ch (following-char))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
608 (= ch 32))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
609 (delete-char 1)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
610 (setq new-language 'toggle))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
611
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
612 ;; "\~!" or "\~! " : switch to verbatim mode
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
613 ((looking-at "~! ?")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
614 (replace-match "")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
615 (setq verbatim t))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
616
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
617 ;; a language flag
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
618 ((setq new-language (ethio-process-language-flag)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
619
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
620 ;; "\~" but not "\~!" nor a language flag
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
621 ((= ch ?~)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
622 (delete-char 1)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
623 (ethio-tilde-escape))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
624
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
625 ;; ASCII punctuation escape. skip
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
626 ((looking-at "\\(,\\|\\.\\|;\\|:\\|'\\|`\\|\?\\|\\\\\\)+")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
627 (goto-char (match-end 0)))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
628
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
629 ;; "\", but not special sequence
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
630 (t
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
631 (setq new-language 'toggle))))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
632
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
633 new-language))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
634
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
635 (defun ethio-process-language-flag nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
636 "Process a language flag of the form \"~lang\" or \"~lang1~lang2\".
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
637
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
638 If looking at \"~lang1~lang2\", set `ethio-primary-language' and
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
639 `ethio-une-secondary-language' based on \"lang1\" and \"lang2\".
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
640 Then delete the language flag \"~lang1~lang2\" from the buffer.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
641 Return value is the new primary language.
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
642
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
643 If looking at \"~lang\", delete that language flag \"~lang\" from the
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
644 buffer and return that language. In this case
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
645 `ethio-primary-language' and `ethio-uni-secondary-language'
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
646 are left unchanged.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
647
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
648 If an unsupported language flag is found, just return nil without
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
649 changing anything."
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
650
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
651 (let (lang1 lang2)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
652 (cond
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
653
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
654 ;; ~lang1~lang2
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
655 ((and (looking-at
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
656 "~\\([a-z][a-z][a-z]?\\)~\\([a-z][a-z][a-z]?\\)[ \t\n\\]")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
657 (setq lang1
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
658 (ethio-flag-to-language
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
659 (buffer-substring (match-beginning 1) (match-end 1))))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
660 (setq lang2
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
661 (ethio-flag-to-language
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
662 (buffer-substring (match-beginning 2) (match-end 2)))))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
663 (setq ethio-primary-language lang1
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
664 ethio-secondary-language lang2)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
665 (delete-region (point) (match-end 2))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
666 (if (= (following-char) 32)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
667 (delete-char 1))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
668 ethio-primary-language)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
669
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
670 ;; ~lang
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
671 ((and (looking-at "~\\([a-z][a-z][a-z]?\\)[ \t\n\\]")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
672 (setq lang1
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
673 (ethio-flag-to-language
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
674 (buffer-substring (match-beginning 1) (match-end 1)))))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
675 (delete-region (point) (match-end 1))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
676 (if (= (following-char) 32)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
677 (delete-char 1))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
678 lang1)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
679
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
680 ;; otherwise
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
681 (t
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
682 nil))))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
683
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
684 (defun ethio-tilde-escape nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
685 "Handle a SERA tilde escape in Ethiopic section and delete it.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
686 Delete the escape even it is not recognised."
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
687
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
688 (let ((p (point)) command)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
689 (skip-chars-forward "^ \t\n\\\\")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
690 (setq command (buffer-substring p (point)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
691 (delete-region p (point))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
692 (if (= (following-char) 32)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
693 (delete-char 1))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
694
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
695 (cond
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
696
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
697 ;; \~-:
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
698 ((string= command "-:")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
699 (setq ethio-use-colon-for-colon t))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
700
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
701 ;; \~`:
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
702 ((string= command "`:")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
703 (setq ethio-use-colon-for-colon nil))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
704
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
705 ;; \~?
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
706 ((string= command "?")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
707 (setq ethio-use-three-dot-question nil))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
708
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
709 ;; \~`|
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
710 ((string= command "`|")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
711 (setq ethio-use-three-dot-question t))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
712
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
713 ;; \~e
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
714 ((string= command "e")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
715 (insert "$(3%j(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
716
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
717 ;; \~E
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
718 ((string= command "E")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
719 (insert "$(3%k(B"))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
720
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
721 ;; \~a
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
722 ((string= command "a")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
723 (insert "$(3%l(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
724
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
725 ;; \~A
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
726 ((string= command "A")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
727 (insert "$(3%m(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
728
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
729 ;; \~X
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
730 ((string= command "X")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
731 (insert "$(3%i(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
732
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
733 ;; unsupported tilde escape
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
734 (t
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
735 nil))))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
736
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
737 (defun ethio-flag-to-language (flag)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
738 (cond
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
739 ((or (string= flag "en") (string= flag "eng")) 'english)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
740 ((or (string= flag "ti") (string= flag "tir")) 'tigrigna)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
741 ((or (string= flag "am") (string= flag "amh")) 'amharic)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
742 (t nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
743
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
744 (defun ethio-convert-digit nil
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
745 "Convert Arabic digits to Ethiopic digits."
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
746 (let (ch z)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
747 (while (and (>= (setq ch (following-char)) ?1)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
748 (<= ch ?9))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
749 (delete-char 1)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
750
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
751 ;; count up following zeros
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
752 (setq z 0)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
753 (while (= (following-char) ?0)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
754 (delete-char 1)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
755 (setq z (1+ z)))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
756
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
757 (cond
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
758
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
759 ;; first digit is 10, 20, ..., or 90
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
760 ((= (mod z 2) 1)
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
761 (insert (aref [?$(3$y(B ?$(3$z(B ?$(3${(B ?$(3$|(B ?$(3$}(B ?$(3$~(B ?$(3%!(B ?$(3%"(B ?$(3%#(B] (- ch ?1)))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
762 (setq z (1- z)))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
763
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
764 ;; first digit is 2, 3, ..., or 9
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
765 ((/= ch ?1)
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
766 (insert (aref [?$(3$q(B ?$(3$r(B ?$(3$s(B ?$(3$t(B ?$(3$u(B ?$(3$v(B ?$(3$w(B ?$(3$x(B] (- ch ?2))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
767
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
768 ;; single 1
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
769 ((= z 0)
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
770 (insert "$(3$p(B")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
771
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
772 ;; 100
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
773 (if (= (mod z 4) 2)
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
774 (insert "$(3%$(B"))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
775
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
776 ;; 10000
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
777 (insert-char ?$(3%%(B (/ z 4)))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
778
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
779 ;;;###autoload
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
780 (defun ethio-sera-to-fidel-mail (&optional arg)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
781 "Convert SERA to FIDEL to read/write mail and news.
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
782
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
783 If the buffer contains the markers \"<sera>\" and \"</sera>\",
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
784 convert the segments between them into FIDEL.
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
785
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
786 If invoked interactively and there is no marker, convert the subject field
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
787 and the body into FIDEL using `ethio-sera-to-fidel-region'."
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
788
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
789 (interactive "p")
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
790 (let ((buffer-read-only nil)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
791 border)
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
792 (save-excursion
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
793
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
794 ;; look for the header-body separator
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
795 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
796 (if (search-forward
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
797 (if (eq major-mode 'rmail-mode)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
798 "\n\n" (concat "\n" mail-header-separator "\n"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
799 nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
800 (setq border (point))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
801 (error "header separator not found"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
802
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
803 ;; note that the point is placed at the border
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
804 (if (or (re-search-forward "^<sera>$" nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
805 (progn
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
806 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
807 (re-search-forward "^Subject: <sera>" border t)))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
808
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
809 ;; there are markers
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
810 (progn
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
811 ;; we start with the body so that the border will not change
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
812 ;; use "^<sera>\n" instead of "^<sera>$" not to leave a blank line
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
813 (goto-char border)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
814 (while (re-search-forward "^<sera>\n" nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
815 (replace-match "")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
816 (ethio-sera-to-fidel-region
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
817 (point)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
818 (progn
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
819 (if (re-search-forward "^</sera>\n" nil 0)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
820 (replace-match ""))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
821 (point))))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
822 ;; now process the subject
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
823 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
824 (if (re-search-forward "^Subject: <sera>" border t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
825 (ethio-sera-to-fidel-region
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
826 (progn (delete-backward-char 6) (point))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
827 (progn
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
828 (if (re-search-forward "</sera>$" (line-end-position) 0)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
829 (replace-match ""))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
830 (point)))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
831
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
832 ;; in case there are no marks but invoked interactively
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
833 (if arg
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
834 (progn
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
835 (ethio-sera-to-fidel-region border (point-max))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
836 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
837 (if (re-search-forward "^Subject: " border t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
838 (ethio-sera-to-fidel-region (point) (line-end-position))))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
839
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
840 ;; adjust the rmail marker
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
841 (if (eq major-mode 'rmail-mode)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
842 (set-marker
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
843 (aref rmail-message-vector (1+ rmail-current-message))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
844 (point-max))))))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
845
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
846 ;;;###autoload
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
847 (defun ethio-sera-to-fidel-marker (&optional force)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
848 "Convert the regions surrounded by \"<sera>\" and \"</sera>\" from SERA to FIDEL.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
849 Assume that each region begins with `ethio-primary-language'.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
850 The markers \"<sera>\" and \"</sera>\" themselves are not deleted."
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
851 (interactive "P")
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
852 (if (and buffer-read-only
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
853 (not force)
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
854 (not (y-or-n-p "Buffer is read-only. Force to convert? ")))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
855 (error ""))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
856 (save-excursion
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
857 (goto-char (point-min))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
858 (while (re-search-forward "<sera>" nil t)
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
859 (ethio-sera-to-fidel-region
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
860 (point)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
861 (if (re-search-forward "</sera>" nil t)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
862 (match-beginning 0)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
863 (point-max))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
864 nil
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
865 'force))))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
866
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
867 ;;
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
868 ;; FIDEL to SERA
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
869 ;;
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
870
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
871 (defconst ethio-fidel-to-sera-map
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
872 [ "he" "hu" "hi" "ha" "hE" "h" "ho" "" ;; 0 - 7
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
873 "le" "lu" "li" "la" "lE" "l" "lo" "lWa" ;; 8
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
874 "He" "Hu" "Hi" "Ha" "HE" "H" "Ho" "HWa" ;; 16
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
875 "me" "mu" "mi" "ma" "mE" "m" "mo" "mWa" ;; 24
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
876 "`se" "`su" "`si" "`sa" "`sE" "`s" "`so" "`sWa" ;; 32
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
877 "re" "ru" "ri" "ra" "rE" "r" "ro" "rWa" ;; 40
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
878 "se" "su" "si" "sa" "sE" "s" "so" "sWa" ;; 48
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
879 "xe" "xu" "xi" "xa" "xE" "x" "xo" "xWa" ;; 56
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
880 "qe" "qu" "qi" "qa" "qE" "q" "qo" "" ;; 64
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
881 "qWe" "" "qWi" "qWa" "qWE" "qW'" "" "" ;; 72
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
882 "Qe" "Qu" "Qi" "Qa" "QE" "Q" "Qo" "" ;; 80
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
883 "QWe" "" "QWi" "QWa" "QWE" "QW'" "" "" ;; 88
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
884 "be" "bu" "bi" "ba" "bE" "b" "bo" "bWa" ;; 96
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
885 "ve" "vu" "vi" "va" "vE" "v" "vo" "vWa" ;; 104
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
886 "te" "tu" "ti" "ta" "tE" "t" "to" "tWa" ;; 112
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
887 "ce" "cu" "ci" "ca" "cE" "c" "co" "cWa" ;; 120
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
888 "`he" "`hu" "`hi" "`ha" "`hE" "`h" "`ho" "" ;; 128
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
889 "hWe" "" "hWi" "hWa" "hWE" "hW'" "" "" ;; 136
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
890 "ne" "nu" "ni" "na" "nE" "n" "no" "nWa" ;; 144
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
891 "Ne" "Nu" "Ni" "Na" "NE" "N" "No" "NWa" ;; 152
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
892 "e" "u" "i" "A" "E" "I" "o" "ea" ;; 160
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
893 "ke" "ku" "ki" "ka" "kE" "k" "ko" "" ;; 168
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
894 "kWe" "" "kWi" "kWa" "kWE" "kW'" "" "" ;; 176
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
895 "Ke" "Ku" "Ki" "Ka" "KE" "K" "Ko" "" ;; 184
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
896 "KWe" "" "KWi" "KWa" "KWE" "KW'" "" "" ;; 192
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
897 "we" "wu" "wi" "wa" "wE" "w" "wo" "" ;; 200
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
898 "`e" "`u" "`i" "`a" "`E" "`I" "`o" "" ;; 208
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
899 "ze" "zu" "zi" "za" "zE" "z" "zo" "zWa" ;; 216
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
900 "Ze" "Zu" "Zi" "Za" "ZE" "Z" "Zo" "ZWa" ;; 224
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
901 "ye" "yu" "yi" "ya" "yE" "y" "yo" "yWa" ;; 232
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
902 "de" "du" "di" "da" "dE" "d" "do" "dWa" ;; 240
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
903 "De" "Du" "Di" "Da" "DE" "D" "Do" "DWa" ;; 248
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
904 "je" "ju" "ji" "ja" "jE" "j" "jo" "jWa" ;; 256
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
905 "ge" "gu" "gi" "ga" "gE" "g" "go" "" ;; 264
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
906 "gWe" "" "gWi" "gWa" "gWE" "gW'" "" "" ;; 272
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
907 "Ge" "Gu" "Gi" "Ga" "GE" "G" "Go" "GWa" ;; 280
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
908 "Te" "Tu" "Ti" "Ta" "TE" "T" "To" "TWa" ;; 288
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
909 "Ce" "Cu" "Ci" "Ca" "CE" "C" "Co" "CWa" ;; 296
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
910 "Pe" "Pu" "Pi" "Pa" "PE" "P" "Po" "PWa" ;; 304
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
911 "Se" "Su" "Si" "Sa" "SE" "S" "So" "SWa" ;; 312
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
912 "`Se" "`Su" "`Si" "`Sa" "`SE" "`S" "`So" "" ;; 320
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
913 "fe" "fu" "fi" "fa" "fE" "f" "fo" "fWa" ;; 328
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
914 "pe" "pu" "pi" "pa" "pE" "p" "po" "pWa" ;; 336
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
915 "mYa" "rYa" "fYa" "" "" "" "" "" ;; 344
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
916 " " " : " "::" "," ";" "-:" ":-" "`?" ;; 352
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
917 ":|:" "1" "2" "3" "4" "5" "6" "7" ;; 360
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
918 "8" "9" "10" "20" "30" "40" "50" "60" ;; 368
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
919 "70" "80" "90" "100" "10000" "" "" "" ;; 376
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
920 "`qe" "`qu" "`qi" "`qa" "`qE" "`q" "`qo" "" ;; 384
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
921 "mWe" "bWe" "GWe" "fWe" "pWe" "" "" "" ;; 392
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
922 "`ke" "`ku" "`ki" "`ka" "`kE" "`k" "`ko" "" ;; 400
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
923 "mWi" "bWi" "GWi" "fWi" "pWi" "" "" "" ;; 408
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
924 "Xe" "Xu" "Xi" "Xa" "XE" "X" "Xo" "" ;; 416
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
925 "mWE" "bWE" "GWE" "fWE" "pWE" "" "" "" ;; 424
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
926 "`ge" "`gu" "`gi" "`ga" "`gE" "`g" "`go" "" ;; 432
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
927 "mW'" "bW'" "GW'" "fW'" "pW'" "" "" "" ;; 440
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
928 "\\~X " "\\~e " "\\~E " "\\~a " "\\~A " "wWe" "wWi" "wWa" ;; 448
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
929 "wWE" "wW'" "''" "`!" "." "<<" ">>" "?" ]) ;; 456
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
930
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
931 (defun ethio-prefer-amharic-p nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
932 (or (eq ethio-primary-language 'amharic)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
933 (and (not (eq ethio-primary-language 'tigrigna))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
934 (eq ethio-secondary-language 'amharic))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
935
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
936 (defun ethio-language-to-flag (lang)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
937 (cond
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
938 ((eq lang 'english) "eng")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
939 ((eq lang 'tigrigna) "tir")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
940 ((eq lang 'amharic) "amh")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
941 (t "")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
942
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
943 ;;;###autoload
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
944 (defun ethio-fidel-to-sera-region (begin end &optional secondary force)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
945 "Replace all the FIDEL characters in the region to the SERA format.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
946 The variable `ethio-primary-language' specifies the primary
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
947 language and `ethio-secondary-language' specifies the secondary.
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
948
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
949 If the 3dr parameter SECONDARY is given and non-nil, try to convert
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
950 the region so that it begins in the secondary language; otherwise with
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
951 the primary language.
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
952
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
953 If the 4th parameter FORCE is given and non-nil, convert even if the
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
954 buffer is read-only.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
955
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
956 See also the descriptions of the variables
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
957 `ethio-use-colen-for-colon', `ethio-use-three-dot-question',
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
958 `ethio-quote-vowel-always' and `ethio-numeric-reduction'."
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
959
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
960 (interactive "r\nP")
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
961 (save-restriction
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
962 (narrow-to-region begin end)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
963 (ethio-fidel-to-sera-buffer secondary force)))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
964
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
965 ;;;###autoload
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
966 (defun ethio-fidel-to-sera-buffer (&optional secondary force)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
967 "Replace all the FIDEL characters in the current buffer to the SERA format.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
968 The variable `ethio-primary-language' specifies the primary
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
969 language and `ethio-secondary-language' specifies the secondary.
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
970
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
971 If the 1st optional parameter SECONDARY is non-nil, try to convert the
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
972 region so that it begins in the secondary language; otherwise with the
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
973 primary language.
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
974
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
975 If the 2nd optional parameter FORCE is non-nil, convert even if the
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
976 buffer is read-only.
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
977
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
978 See also the descriptions of the variables
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
979 `ethio-use-colen-for-colon', `ethio-use-three-dot-question',
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
980 `ethio-quote-vowel-always' and `ethio-numeric-reduction'."
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
981
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
982 (interactive "P")
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
983 (if (and buffer-read-only
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
984 (not force)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
985 (not (y-or-n-p "Buffer is read-only. Force to convert? ")))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
986 (error ""))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
987
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
988 (let ((buffer-read-only nil)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
989 (case-fold-search nil)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
990 (lonec nil) ;; t means previous char was a lone consonant
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
991 (fidel nil) ;; t means previous char was a FIDEL
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
992 (digit nil) ;; t means previous char was an Ethiopic digit
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
993 (flag (if (ethio-prefer-amharic-p) "\\~amh " "\\~tir "))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
994 mode ch)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
995
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
996 ;; user's preference in transcription
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
997 (if ethio-use-colon-for-colon
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
998 (progn
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
999 (aset ethio-fidel-to-sera-map 353 "`:")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1000 (aset ethio-fidel-to-sera-map 357 ":"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1001 (aset ethio-fidel-to-sera-map 353 " : ")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1002 (aset ethio-fidel-to-sera-map 357 "-:"))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1003
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1004 (if ethio-use-three-dot-question
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1005 (progn
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1006 (aset ethio-fidel-to-sera-map 359 "?")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1007 (aset ethio-fidel-to-sera-map 463 "`?"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1008 (aset ethio-fidel-to-sera-map 359 "`?")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1009 (aset ethio-fidel-to-sera-map 463 "?"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1010
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1011 (mapcar
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1012 '(lambda (x)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1013 (aset (aref ethio-fidel-to-sera-map x)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1014 2
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1015 (if ethio-W-sixth-always ?' ?u)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1016 '(77 93 141 181 197 277 440 441 442 443 444 457))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1017
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1018 (if (ethio-prefer-amharic-p)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1019 (aset ethio-fidel-to-sera-map 160 "a")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1020 (aset ethio-fidel-to-sera-map 160 "e"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1021 ;; end of user's preference
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1022
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1023 ;; first, decompose geminated characters
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1024 (decompose-region (point-min) (point-max))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1025
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1026 ;; main conversion routine
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1027 (goto-char (point-min))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1028 (while (not (eobp))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1029 (setq ch (following-char))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1030
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1031 (cond ; ethiopic, english, neutral
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1032
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1033 ;; ethiopic character. must go to ethiopic mode, if not in it.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1034 ((eq (char-charset ch) 'ethiopic)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1035 (setq ch (ethio-char-to-ethiocode ch))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1036 (delete-char 1)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1037 (if (not (eq mode 'ethiopic))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1038 (progn
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1039 (insert flag)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1040 (setq mode 'ethiopic)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1041
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1042 (cond ; fidel, punc, digit
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1043
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1044 ;; fidels
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1045 ((or (<= ch 346) ; he - fYa
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1046 (and (>= ch 384) (<= ch 444)) ; `qe - pw
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1047 (and (>= ch 453) (<= ch 457))) ; wWe - wW
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1048 (if (and (memq ch '(160 161 162 163 164 166 167)) ; (e - ea)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1049 (or lonec
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1050 (and ethio-quote-vowel-always
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1051 fidel)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1052 (insert "'"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1053 (insert (aref ethio-fidel-to-sera-map ch))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1054 (setq lonec (ethio-lone-consonant-p ch)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1055 fidel t
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1056 digit nil))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1057
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1058 ;; punctuations or icons
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1059 ((or (and (>= ch 353) (<= ch 360)) ; : - :|:
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1060 (>= ch 458) ; '' - ?
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1061 (and (>= ch 448) (<= ch 452))) ; \~X \~e \~E \~a \~A
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1062 (insert (aref ethio-fidel-to-sera-map ch))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1063 (setq lonec nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1064 fidel nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1065 digit nil))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1066
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1067 ;; now CH must be an ethiopic digit
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1068
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1069 ;; reduction = 0 or not preceded by Ethiopic number(s)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1070 ((or (= ethio-numeric-reduction 0)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1071 (not digit))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1072 (insert "`" (aref ethio-fidel-to-sera-map ch))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1073 (setq lonec nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1074 fidel nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1075 digit t))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1076
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1077 ;; reduction = 2 and following 10s, 100s, 10000s
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1078 ((and (= ethio-numeric-reduction 2)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1079 (memq ch '(370 379 380)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1080 (insert (substring (aref ethio-fidel-to-sera-map ch) 1))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1081 (setq lonec nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1082 fidel nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1083 digit t))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1084
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1085 ;; ordinary following digits
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1086 (t
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1087 (insert (aref ethio-fidel-to-sera-map ch))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1088 (setq lonec nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1089 fidel nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1090 digit t))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1091
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1092 ;; english character. must go to english mode, if not in it.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1093 ((or (and (>= ch ?a) (<= ch ?z))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1094 (and (>= ch ?A) (<= ch ?Z)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1095 (if (not (eq mode 'english))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1096 (insert "\\~eng "))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1097 (forward-char 1)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1098 (setq mode 'english
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1099 lonec nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1100 fidel nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1101 digit nil))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1102
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1103 ;; ch can appear both in ethiopic section and in english section.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1104 (t
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1105
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1106 ;; we must decide the mode, if not decided yet
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1107 (if (null mode)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1108 (progn
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1109 (setq mode
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1110 (if secondary
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1111 ethio-secondary-language
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1112 ethio-primary-language))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1113 (if (eq mode 'english)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1114 (insert "\\~eng ")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1115 (insert flag)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1116 (setq mode 'ethiopic)))) ; tigrigna & amharic --> ethiopic
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1117
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1118 (cond ; \ , eng-mode , punc , w3 , other
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1119
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1120 ;; backslash is always quoted
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1121 ((= ch ?\\ )
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1122 (insert "\\")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1123 (forward-char 1))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1124
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1125 ;; nothing to do if in english mode
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1126 ((eq mode 'english)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1127 (forward-char 1))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1128
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1129 ;; now we must be in ethiopic mode and seeing a non-"\"
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1130
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1131 ;; ascii punctuations in ethiopic mode
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1132 ((looking-at "[,.;:'`?]+")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1133 (insert "\\")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1134 (goto-char (1+ (match-end 0)))) ; because we inserted one byte (\)
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1135
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1136 ;; skip from "<" to ">" (or from "&" to ";") if called from w3
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1137 ((and (boundp 'sera-being-called-by-w3)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1138 sera-being-called-by-w3
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1139 (or (= ch ?<) (= ch ?&)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1140 (search-forward (if (= ch ?<) ">" ";")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1141 nil 0))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1142
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1143 ;; neutral character. no need to quote. just skip it.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1144 (t
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1145 (forward-char 1)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1146
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1147 (setq lonec nil
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1148 fidel nil
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1149 digit nil)))
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1150 ;; end of main conversion routine
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1151 )))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1152
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1153 (defun ethio-lone-consonant-p (ethiocode)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1154 "If ETHIOCODE is an Ethiopic lone consonant, return t."
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1155 (or (and (< ethiocode 344) (= (% ethiocode 8) 5))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1156
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1157 ;; `q `k X `g mW bW GW fW pW wW
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1158 (memq ethiocode '(389 405 421 437 440 441 442 443 444 457))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1159
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1160 ;;;###autoload
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1161 (defun ethio-fidel-to-sera-mail nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1162 "Convert FIDEL to SERA to read/write mail and news.
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1163
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1164 If the body contains at least one Ethiopic character,
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1165 1) insert the string \"<sera>\" at the beginning of the body,
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1166 2) insert \"</sera>\" at the end of the body, and
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1167 3) convert the body into SERA.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1168
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1169 The very same procedure applies to the subject field, too."
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1170
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1171 (interactive)
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1172 (let ((buffer-read-only nil)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1173 border)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1174 (save-excursion
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1175
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1176 ;; look for the header-body separator
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1177 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1178 (if (search-forward
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1179 (if (eq major-mode 'rmail-mode)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1180 "\n\n" (concat "\n" mail-header-separator "\n"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1181 nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1182 (setq border (point))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1183 (error "header separator not found"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1184
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1185 ;; process body first not to change the border
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1186 ;; note that the point is already at the border
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1187 (if (re-search-forward "\\ce" nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1188 (progn
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1189 (ethio-fidel-to-sera-region border (point-max))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1190 (goto-char border)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1191 (insert "<sera>")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1192 (goto-char (point-max))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1193 (insert "</sera>")))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1194
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1195 ;; process subject
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1196 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1197 (if (re-search-forward "^Subject: " border t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1198 (let ((beg (point))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1199 (end (line-end-position)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1200 (if (re-search-forward "\\ce" end t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1201 (progn
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1202 (ethio-fidel-to-sera-region beg end)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1203 (goto-char beg)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1204 (insert "<sera>")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1205 (end-of-line)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1206 (insert "</sera>")))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1207
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1208 ;; adjust the rmail marker
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1209 (if (eq major-mode 'rmail-mode)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1210 (set-marker
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1211 (aref rmail-message-vector (1+ rmail-current-message))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1212 (point-max))))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1213
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1214 ;;;###autoload
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1215 (defun ethio-fidel-to-sera-marker (&optional force)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1216 "Convert the regions surrounded by \"<sera>\" and \"</sera>\" from FIDEL to SERA.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1217 The markers \"<sera>\" and \"</sera>\" themselves are not deleted."
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1218
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1219 (interactive "P")
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1220 (if (and buffer-read-only
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1221 (not force)
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1222 (not (y-or-n-p "Buffer is read-only. Force to convert? ")))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1223 (error ""))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1224 (save-excursion
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1225 (goto-char (point-min))
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1226 (while (re-search-forward "<sera>" nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1227 (ethio-fidel-to-sera-region
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1228 (point)
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1229 (if (re-search-forward "</sera>" nil t)
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1230 (match-beginning 0)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1231 (point-max))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1232 nil
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1233 'force))))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1234
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1235 ;;
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1236 ;; vowel modification
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1237 ;;
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1238
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1239 ;;;###autoload
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1240 (defun ethio-modify-vowel nil
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1241 "Modify the vowel of the FIDEL that is under the cursor."
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1242 (interactive)
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1243 (let ((ch (following-char))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1244 (composite nil) ; geminated or not
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1245 newch base vowel modulo)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1246
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1247 (cond
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1248 ;; in case of gemination
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1249 ((eq (char-charset ch) 'composition)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1250 (setq ch (string-to-char (decompose-composite-char ch))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1251 composite t))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1252 ;; neither gemination nor fidel
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1253 ((not (eq (char-charset ch) 'ethiopic))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1254 (error "Not a valid character.")))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1255
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1256 ;; set frequently referred character features
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1257 (setq ch (ethio-char-to-ethiocode ch)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1258 base (* (/ ch 8) 8)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1259 modulo (% ch 8))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1260
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1261 (if (or (and (>= ch 344) (<= ch 380)) ;; mYa - `10000
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1262 (and (>= ch 448) (<= ch 452)) ;; \~X - \~A
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1263 (>= ch 458)) ;; private punctuations
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1264 (error "Not a valid character."))
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1265
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1266 (setq
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1267 newch
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1268 (cond
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1269
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1270 ;; first standalone vowels
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1271 ((= base 160)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1272 (if (ethio-prefer-amharic-p)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1273 (message "Modify vowel to: [auiAEIoW\"] ")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1274 (message "Modify vowel to: [euiAEIoW\"] "))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1275 (setq vowel (read-char))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1276 (cond
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1277 ((= vowel ?e) 160)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1278 ((= vowel ?u) 161)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1279 ((= vowel ?i) 162)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1280 ((= vowel ?A) 163)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1281 ((= vowel ?E) 164)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1282 ((= vowel ?I) 165)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1283 ((= vowel ?o) 166)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1284 ((= vowel ?W) 167)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1285 ((= vowel ?a) (if (ethio-prefer-amharic-p) 160 163))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1286 ((= vowel ?\") (setq composite t) ch)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1287 (t nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1288
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1289 ;; second standalone vowels
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1290 ((= base 208)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1291 (message "Modify vowel to: [euiaEIo\"] ")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1292 (setq vowel (read-char))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1293 (cond
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1294 ((= vowel ?e) 208)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1295 ((= vowel ?u) 209)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1296 ((= vowel ?i) 210)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1297 ((= vowel ?a) 211)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1298 ((= vowel ?E) 212)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1299 ((= vowel ?I) 213)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1300 ((= vowel ?o) 214)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1301 ((= vowel ?\") (setq composite t) ch)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1302 (t nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1303
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1304 ;; 12-form consonants, *W* form
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1305 ((memq base '(72 88 136 176 192 272)) ; qW QW hW kW KW gW
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1306 (message "Modify vowel to: [euiaE'\"] ")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1307 (setq vowel (read-char))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1308 (cond
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1309 ((= vowel ?e) base)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1310 ((= vowel ?u) (+ base 5))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1311 ((= vowel ?i) (+ base 2))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1312 ((= vowel ?a) (+ base 3))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1313 ((= vowel ?E) (+ base 4))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1314 ((= vowel ?') (+ base 5))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1315 ((= vowel ?\") (setq composite t) ch)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1316 (t nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1317
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1318 ;; extended 12-form consonants, mWa bWa GWa fWa pWa
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1319 ((= ch 31) ; mWa
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1320 (message "Modify vowel to: [euiaE'\"] ")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1321 (setq vowel (read-char))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1322 (cond
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1323 ((= vowel ?e) 392)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1324 ((= vowel ?u) 440)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1325 ((= vowel ?i) 408)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1326 ((= vowel ?a) ch)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1327 ((= vowel ?E) 424)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1328 ((= vowel ?') 440)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1329 ((= vowel ?\") (setq composite t) ch)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1330 (t nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1331 ((= ch 103) ; bWa
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1332 (message "Modify vowel to: [euiaE'\"] ")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1333 (setq vowel (read-char))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1334 (cond
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1335 ((= vowel ?e) 393)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1336 ((= vowel ?u) 441)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1337 ((= vowel ?i) 409)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1338 ((= vowel ?a) ch)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1339 ((= vowel ?E) 425)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1340 ((= vowel ?') 441)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1341 ((= vowel ?\") (setq composite t) ch)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1342 (t nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1343 ((= ch 287) ; GWa
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1344 (message "Modify vowel to: [euiaE'\"] ")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1345 (setq vowel (read-char))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1346 (cond
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1347 ((= vowel ?e) 394)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1348 ((= vowel ?u) 442)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1349 ((= vowel ?i) 410)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1350 ((= vowel ?a) ch)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1351 ((= vowel ?E) 426)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1352 ((= vowel ?') 442)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1353 ((= vowel ?\") (setq composite t) ch)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1354 (t nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1355 ((= ch 335) ; fWa
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1356 (message "Modify vowel to: [euiaE'\"] ")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1357 (setq vowel (read-char))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1358 (cond
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1359 ((= vowel ?e) 395)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1360 ((= vowel ?u) 443)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1361 ((= vowel ?i) 411)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1362 ((= vowel ?a) ch)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1363 ((= vowel ?E) 427)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1364 ((= vowel ?') 443)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1365 ((= vowel ?\") (setq composite t) ch)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1366 (t nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1367 ((= ch 343) ; pWa
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1368 (message "Modify vowel to: [euiaE'\"] ")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1369 (setq vowel (read-char))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1370 (cond
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1371 ((= vowel ?e) 396)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1372 ((= vowel ?u) 444)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1373 ((= vowel ?i) 412)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1374 ((= vowel ?a) ch)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1375 ((= vowel ?E) 428)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1376 ((= vowel ?') 444)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1377 ((= vowel ?\") (setq composite t) ch)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1378 (t nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1379
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1380 ;; extended 12-form consonatns, mW* bW* GW* fW* pW*
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1381 ((memq base '(392 408 424 440)) ; *We *Wi *WE *W
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1382 (message "Modify vowel to: [eiEau'\"] ")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1383 (setq vowel (read-char))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1384 (cond
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1385 ((= vowel ?e) (+ 392 modulo))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1386 ((= vowel ?i) (+ 408 modulo))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1387 ((= vowel ?E) (+ 424 modulo))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1388 ((= vowel ?a) (cond
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1389 ((= modulo 0) 31) ; mWa
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1390 ((= modulo 1) 103) ; bWa
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1391 ((= modulo 2) 287) ; GWa
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1392 ((= modulo 3) 335) ; fWa
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1393 ((= modulo 4) 343) ; pWa
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1394 (t nil))) ; never reach here
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1395 ((= vowel ?') (+ 440 modulo))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1396 ((= vowel ?u) (+ 440 modulo))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1397 ((= vowel ?\") (setq composite t) ch)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1398 (t nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1399
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1400 ((and (>= ch 453) (<= ch 457)) ; wWe wWi wWa wWE wW
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1401 (message "Modify vowel to: [eiaE'u\"] ")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1402 (setq vowel (read-char))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1403 (cond
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1404 ((= vowel ?e) 453)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1405 ((= vowel ?i) 454)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1406 ((= vowel ?a) 455)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1407 ((= vowel ?E) 456)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1408 ((= vowel ?') 457)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1409 ((= vowel ?u) 457)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1410 ((= vowel ?\") (setq composite t) ch)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1411 (t nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1412
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1413 ;; 7-form consonants, or
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1414 ;; first 7 of 8-form consonants
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1415 ((<= modulo 6)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1416 (message "Modify vowel to: [euiaE'o\"] ")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1417 (setq vowel (read-char))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1418 (cond
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1419 ((= vowel ?e) base)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1420 ((= vowel ?u) (+ base 1))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1421 ((= vowel ?i) (+ base 2))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1422 ((= vowel ?a) (+ base 3))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1423 ((= vowel ?E) (+ base 4))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1424 ((= vowel ?') (+ base 5))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1425 ((= vowel ?o) (+ base 6))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1426 ((= vowel ?\") (setq composite t) ch)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1427 (t nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1428
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1429 ;; otherwise
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1430 (t
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1431 nil)))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1432
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1433 (cond
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1434
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1435 ;; could not get new character
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1436 ((null newch)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1437 (error "Invalid vowel"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1438
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1439 ;; vowel changed on a composite Fidel
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1440 (composite
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1441 (delete-char 1)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1442 (insert
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1443 (compose-string
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1444 (concat (char-to-string (ethio-ethiocode-to-char newch)) "$(3%s(B"))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1445
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1446 ;; simple vowel modification
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1447 (t
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1448 (delete-char 1)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1449 (insert (ethio-ethiocode-to-char newch))))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1450
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1451 (defun ethio-ethiocode-to-char (ethiocode)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1452 (make-char
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1453 'ethiopic
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1454 (+ (/ ethiocode 94) 33)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1455 (+ (mod ethiocode 94) 33)))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1456
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1457 (defun ethio-char-to-ethiocode (ch)
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1458 (and (eq (char-charset ch) 'ethiopic)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1459 (let ((char-components (split-char ch)))
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1460 (+ (* (- (nth 1 char-components) 33) 94)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1461 (- (nth 2 char-components) 33)))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1462
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1463 ;;
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1464 ;; space replacement
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1465 ;;
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1466
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1467 ;;;###autoload
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1468 (defun ethio-replace-space (ch begin end)
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1469 "Replace ASCII spaces with Ethiopic word separators in the region.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1470
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1471 In the specified region, replace word separators surrounded by two
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1472 Ethiopic characters, depending on the first parameter CH, which should
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1473 be 1, 2, or 3.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1474
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1475 If CH = 1, word separator will be replaced with an ASCII space.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1476 If CH = 2, with two ASCII spaces.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1477 If CH = 3, with the Ethiopic colon-like word separator.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1478
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1479 The second and third parameters BEGIN and END specify the region."
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1480
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1481 (interactive "*cReplace spaces to: 1 (sg col), 2 (dbl col), 3 (Ethiopic)\nr")
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1482 (if (not (memq ch '(?1 ?2 ?3)))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1483 (error ""))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1484 (save-excursion
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1485 (save-restriction
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1486 (narrow-to-region begin end)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1487
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1488 (cond
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1489 ((= ch ?1)
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1490 ;; an Ethiopic word separator --> an ASCII space
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1491 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1492 (while (search-forward "$(3$h(B" nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1493 (replace-match " " nil t))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1494
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1495 ;; two ASCII spaces between Ethiopic characters --> an ASCII space
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1496 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1497 (while (re-search-forward "\\(\\ce\\) \\(\\ce\\)" nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1498 (replace-match "\\1 \\2")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1499 (goto-char (match-beginning 2))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1500
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1501 ((= ch ?2)
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1502 ;; An Ethiopic word separator --> two ASCII spaces
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1503 (goto-char (point-min))
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1504 (while (search-forward "$(3$h(B" nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1505 (replace-match " "))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1506
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1507 ;; An ASCII space between Ethiopic characters --> two ASCII spaces
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1508 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1509 (while (re-search-forward "\\(\\ce\\) \\(\\ce\\)" nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1510 (replace-match "\\1 \\2")
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1511 (goto-char (match-beginning 2))))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1512
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1513 (t
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1514 ;; One or two ASCII spaces between Ethiopic characters
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1515 ;; --> An Ethiopic word separator
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1516 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1517 (while (re-search-forward "\\(\\ce\\) ?\\(\\ce\\)" nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1518 (replace-match "\\1$(3$h(B\\2")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1519 (goto-char (match-beginning 2)))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1520
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1521 ;; Three or more ASCII spaces between Ethiopic characters
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1522 ;; --> An Ethiopic word separator + (N - 2) ASCII spaces
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1523 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1524 (while (re-search-forward "\\(\\ce\\) \\( *\\ce\\)" nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1525 (replace-match "\\1$(3$h(B\\2")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1526 (goto-char (match-beginning 2))))))))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1527
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1528 ;;
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1529 ;; special icons
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1530 ;;
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1531
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1532 ;;;###autoload
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1533 (defun ethio-input-special-character (arg)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1534 "Allow the user to input special characters."
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1535 (interactive "*cInput number: 1.$(3%j(B 2.$(3%k(B 3.$(3%l(B 4.$(3%m(B 5.$(3%i(B")
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1536 (cond
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1537 ((= arg ?1)
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1538 (insert "$(3%j(B"))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1539 ((= arg ?2)
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1540 (insert "$(3%k(B"))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1541 ((= arg ?3)
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1542 (insert "$(3%l(B"))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1543 ((= arg ?4)
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1544 (insert "$(3%m(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1545 ((= arg ?5)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1546 (insert "$(3%i(B"))
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1547 (t
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1548 (error ""))))
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1549
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1550 ;;
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1551 ;; TeX support
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1552 ;;
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1553
17774
ade41b936c3e (fidel-to-tex-map): Name changed to ethio-fidel-to-tex-map.
Kenichi Handa <handa@m17n.org>
parents: 17315
diff changeset
1554 (defconst ethio-fidel-to-tex-map
17299
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1555 [ "heG" "huG" "hiG" "haG" "hEG" "hG" "hoG" "" ;; 0 - 7
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1556 "leG" "luG" "liG" "laG" "lEG" "lG" "loG" "lWaG" ;; 8
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1557 "HeG" "HuG" "HiG" "HaG" "HEG" "HG" "HoG" "HWaG" ;; 16
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1558 "meG" "muG" "miG" "maG" "mEG" "mG" "moG" "mWaG" ;; 24
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1559 "sseG" "ssuG" "ssiG" "ssaG" "ssEG" "ssG" "ssoG" "ssWaG" ;; 32
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1560 "reG" "ruG" "riG" "raG" "rEG" "rG" "roG" "rWaG" ;; 40
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1561 "seG" "suG" "siG" "saG" "sEG" "sG" "soG" "sWaG" ;; 48
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1562 "xeG" "xuG" "xiG" "xaG" "xEG" "xG" "xoG" "xWaG" ;; 56
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1563 "qeG" "quG" "qiG" "qaG" "qE" "qG" "qoG" "" ;; 64
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1564 "qWeG" "" "qWi" "qWaG" "qWEG" "qWG" "" "" ;; 72
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1565 "QeG" "QuG" "QiG" "QaG" "QEG" "QG" "QoG" "" ;; 80
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1566 "QWeG" "" "QWiG" "QWaG" "QWEG" "QWG" "" "" ;; 88
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1567 "beG" "buG" "biG" "baG" "bEG" "bG" "boG" "bWaG" ;; 96
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1568 "veG" "vuG" "viG" "vaG" "vEG" "vG" "voG" "vWaG" ;; 104
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1569 "teG" "tuG" "tiG" "taG" "tEG" "tG" "toG" "tWaG" ;; 112
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1570 "ceG" "cuG" "ciG" "caG" "cEG" "cG" "coG" "cWaG" ;; 120
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1571 "hheG" "hhuG" "hhiG" "hhaG" "hhEG" "hhG" "hhoG" "" ;; 128
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1572 "hWeG" "" "hWiG" "hWaG" "hWEG" "hWG" "" "" ;; 136
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1573 "neG" "nuG" "niG" "naG" "nEG" "nG" "noG" "nWaG" ;; 144
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1574 "NeG" "NuG" "NiG" "NaG" "NEG" "NG" "NoG" "NWaG" ;; 152
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1575 "eG" "uG" "iG" "AG" "EG" "IG" "oGG" "eaG" ;; 160
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1576 "keG" "kuG" "kiG" "kaG" "kEG" "kG" "koG" "" ;; 168
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1577 "kWeG" "" "kWiG" "kWa" "kWEG" "kWG" "" "" ;; 176
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1578 "KeG" "KuG" "KiG" "KaG" "KEG" "KG" "KoG" "" ;; 184
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1579 "KWeG" "" "KWiG" "KWa" "KWEG" "KWG" "" "" ;; 192
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1580 "weG" "wuG" "wiG" "waG" "wEG" "wG" "woG" "" ;; 200
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1581 "eeG" "uuG" "iiG" "aaG" "EEG" "IIG" "ooG" "" ;; 208
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1582 "zeG" "zuG" "ziG" "zaG" "zEG" "zG" "zoG" "zWaG" ;; 216
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1583 "ZeG" "ZuG" "ZiG" "ZaG" "ZEG" "ZG" "ZoG" "ZWaG" ;; 224
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1584 "yeG" "yuG" "yiG" "yaG" "yEG" "yG" "yoG" "yWaG" ;; 232
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1585 "deG" "duG" "diG" "daG" "dEG" "dG" "doG" "dWaG" ;; 240
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1586 "DeG" "DuG" "DiG" "DaG" "DEG" "DG" "DoG" "DWaG" ;; 248
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1587 "jeG" "juG" "jiG" "jaG" "jEG" "jG" "joG" "jWaG" ;; 256
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1588 "geG" "guG" "giG" "gaG" "gEG" "gG" "goG" "" ;; 264
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1589 "gWeG" "" "gWiG" "gWaG" "gWEG" "gWG" "" "" ;; 272
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1590 "GeG" "GuG" "GiG" "GaG" "GEG" "GG" "GoG" "GWaG" ;; 280
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1591 "TeG" "TuG" "TiG" "TaG" "TEG" "TG" "ToG" "TWaG" ;; 288
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1592 "CeG" "CuG" "CiG" "CaG" "CEG" "CG" "CoG" "CWaG" ;; 296
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1593 "PeG" "PuG" "PiG" "PaG" "PEG" "PG" "PoG" "PWaG" ;; 304
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1594 "SeG" "SuG" "SiG" "SaG" "SEG" "SG" "SoG" "SWaG" ;; 312
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1595 "SSeG" "SSuG" "SSiG" "SSaG" "SSEG" "SSG" "SSoG" "" ;; 320
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1596 "feG" "fuG" "fiG" "faG" "fEG" "fG" "foG" "fWaG" ;; 328
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1597 "peG" "puG" "piG" "paG" "pEG" "pG" "poG" "pWaG" ;; 336
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1598 "mYaG" "rYaG" "fYaG" "" "" "" "" "" ;; 344
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1599 "" "spaceG" "periodG" "commaG" ;; 352
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1600 "semicolonG" "colonG" "precolonG" "oldqmarkG" ;; 356
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1601 "pbreakG" "andG" "huletG" "sostG" "aratG" "amstG" "sadstG" "sabatG" ;; 360
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1602 "smntG" "zeteNG" "asrG" "heyaG" "selasaG" "arbaG" "hemsaG" "slsaG" ;; 368
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1603 "sebaG" "semanyaG" "zeTanaG" "metoG" "asrxiG" "" "" "" ;; 376
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1604 "qqeG" "qquG" "qqiG" "qqaG" "qqEG" "qqG" "qqoG" "" ;; 384
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1605 "mWeG" "bWeG" "GWeG" "fWeG" "pWeG" "" "" "" ;; 392
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1606 "kkeG" "kkuG" "kkiG" "kkaG" "kkEG" "kkG" "kkoG" "" ;; 400
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1607 "mWiG" "bWiG" "GWiG" "fWiG" "pWiG" "" "" "" ;; 408
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1608 "XeG" "XuG" "GXiG" "XaG" "XEG" "XG" "XoG" "" ;; 416
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1609 "mWEG" "bWEG" "GWEG" "fWEG" "pWEG" "" "" "" ;; 424
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1610 "ggeG" "gguG" "ggiG" "ggaG" "ggEG" "ggG" "ggoG" "" ;; 432
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1611 "mWG" "bWG" "GWG" "fWG" "pWG" "" "" "" ;; 440
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1612 "ornamentG" "flandG" "iflandG" "africaG" ;; 448
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1613 "iafricaG" "wWeG" "wWiG" "wWaG" ;; 452
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1614 "wWEG" "wWG" "" "slaqG" "dotG" "lquoteG" "rquoteG" "qmarkG" ]) ;; 456
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1615
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1616 ;;
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1617 ;; To make tex-to-fidel mapping.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1618 ;; The following code makes
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1619 ;; (get 'ethio-tex-command-he 'ethio-fidel-char) ==> ?$(3!!(B
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1620 ;; etc.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1621 ;;
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1622
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1623 (let ((i 0) str)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1624 (while (< i (length ethio-fidel-to-tex-map))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1625 (setq str (aref ethio-fidel-to-tex-map i))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1626 (if (not (string= str ""))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1627 (put
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1628 (intern (concat "ethio-tex-command-" (aref ethio-fidel-to-tex-map i)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1629 'ethio-fidel-char
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1630 (ethio-ethiocode-to-char i)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1631 (setq i (1+ i))))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1632
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1633 ;;;###autoload
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1634 (defun ethio-fidel-to-tex-buffer nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1635 "Convert each fidel characters in the current buffer into a fidel-tex command.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1636 Each command is always surrounded by braces."
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1637 (interactive)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1638 (let ((buffer-read-only nil))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1639
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1640 ;; Isolated gemination marks need special treatement
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1641 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1642 (while (search-forward "$(3%s(B" nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1643 (replace-match "\\geminateG{}" t t))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1644
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1645 ;; First, decompose geminations
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1646 ;; Here we assume that each composed character consists of
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1647 ;; one Ethiopic character and the Ethiopic gemination mark.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1648 (decompose-region (point-min) (point-max))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1649
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1650 ;; Special treatment for geminated characters
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1651 ;; The geminated character (la'') will be "\geminateG{\la}".
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1652 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1653 (while (search-forward "$(3%s(B" nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1654 (delete-backward-char 1)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1655 (backward-char 1)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1656 (insert "\\geminateG")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1657 (forward-char 1))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1658
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1659 ;; Ethiopic characters to TeX macros
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1660 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1661 (while (re-search-forward "\\ce" nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1662 (insert
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1663 "{\\"
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1664 (aref ethio-fidel-to-tex-map
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1665 (prog1 (ethio-char-to-ethiocode (preceding-char))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1666 (backward-delete-char 1)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1667 "}"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1668 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1669 (set-buffer-modified-p nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1670
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1671 ;;;###autoload
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1672 (defun ethio-tex-to-fidel-buffer nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1673 "Convert fidel-tex commands in the current buffer into fidel chars."
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1674 (interactive)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1675 (let ((buffer-read-only nil)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1676 (p) (ch))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1677
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1678 ;; Special treatment for gemination
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1679 ;; "\geminateG{\la}" or "\geminateG{{\la}}" will be "\la$(3%s(B"
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1680 ;; "\geminateG{}" remains unchanged.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1681 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1682 (while (re-search-forward "\\\\geminateG{\\(\\\\[a-zA-Z]+\\)}" nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1683 (replace-match "\\1$(3%s(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1684
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1685 ;; TeX macros to Ethiopic characters
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1686 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1687 (while (search-forward "\\" nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1688 (setq p (point))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1689 (skip-chars-forward "a-zA-Z")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1690 (setq ch
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1691 (get (intern (concat "ethio-tex-command-"
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1692 (buffer-substring p (point))))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1693 'ethio-fidel-char))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1694 (if ch
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1695 (progn
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1696 (delete-region (1- p) (point)) ; don't forget the preceding "\"
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1697 (if (and (= (preceding-char) ?{)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1698 (= (following-char) ?}))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1699 (progn
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1700 (backward-delete-char 1)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1701 (delete-char 1)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1702 (insert ch))))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1703
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1704 ;; compose geminated characters
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1705 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1706 (while (re-search-forward "\\ce$(3%s(B" nil 0)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1707 (compose-region
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1708 (save-excursion (backward-char 2) (point))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1709 (point)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1710
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1711 ;; Now it's time to convert isolated gemination marks.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1712 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1713 (while (search-forward "\\geminateG{}" nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1714 (replace-match "$(3%s(B"))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1715
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1716 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1717 (set-buffer-modified-p nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1718
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1719 ;;
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1720 ;; Java support
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1721 ;;
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1722
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1723 ;;;###autoload
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1724 (defun ethio-fidel-to-java-buffer nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1725 "Convert Ethiopic characters into the Java escape sequences.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1726
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1727 Each escape sequence is of the form \uXXXX, where XXXX is the
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1728 character's codepoint (in hex) in Unicode.
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1729
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1730 If `ethio-java-save-lowercase' is non-nil, use [0-9a-f].
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1731 Otherwise, [0-9A-F]."
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1732 (let ((ucode))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1733
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1734 ;; first, decompose geminations
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1735 (decompose-region (point-min) (point-max))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1736
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1737 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1738 (while (re-search-forward "\\ce" nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1739 (setq ucode (+ ?\x1200 (ethio-char-to-ethiocode (preceding-char))))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1740 (if (> ucode ?\x13bc)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1741 (setq ucode (+ ucode 59952)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1742 (delete-backward-char 1)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1743 (if ethio-java-save-lowercase
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1744 (insert (format "\\u%4x" ucode))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1745 (insert (upcase (format "\\u%4x" ucode)))))))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1746
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1747 ;;;###autoload
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1748 (defun ethio-java-to-fidel-buffer nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1749 "Convert the Java escape sequences into corresponding Ethiopic characters."
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1750 (let ((ucode))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1751 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1752 (while (re-search-forward "\\\\u\\([0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]\\)" nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1753 (setq ucode
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1754 (read
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1755 (concat
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1756 "?\\x"
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1757 (buffer-substring (match-beginning 1) (match-end 1)))))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1758 (cond
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1759 ((and (>= ucode ?\x1200) (<= ucode ?\x13bc))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1760 (replace-match "")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1761 (insert (ethio-ethiocode-to-char (- ucode ?\x1200))))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1762 ((and (>= ucode ?\xfdf1) (<= ucode ?\xfdff))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1763 (replace-match "")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1764 (insert (ethio-ethiocode-to-char (- ucode 64560))))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1765 (t
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1766 nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1767
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1768 ;; gemination
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1769 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1770 (while (re-search-forward "\\ce$(3%s(B" nil 0)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1771 (compose-region
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1772 (save-excursion (backward-char 2) (point))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1773 (point)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1774 ))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1775
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1776 ;;
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1777 ;; file I/O hooks
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1778 ;;
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1779
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1780 ;;;###autoload
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1781 (defun ethio-find-file nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1782 "Transcribe file content into Ethiopic dependig on filename suffix."
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1783 (cond
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1784
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1785 ((string-match "\\.sera$" (buffer-file-name))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1786 (save-excursion
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1787 (ethio-sera-to-fidel-buffer nil 'force)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1788 (set-buffer-modified-p nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1789
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1790 ((string-match "\\.html$" (buffer-file-name))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1791 (let ((sera-being-called-by-w3 t))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1792 (save-excursion
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1793 (ethio-sera-to-fidel-marker 'force)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1794 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1795 (while (re-search-forward "&[lr]aquote;" nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1796 (if (= (char-after (1+ (match-beginning 0))) ?l)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1797 (replace-match "$(3%v(B")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1798 (replace-match "$(3%w(B")))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1799 (set-buffer-modified-p nil))))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1800
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1801 ((string-match "\\.tex$" (buffer-file-name))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1802 (save-excursion
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1803 (ethio-tex-to-fidel-buffer)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1804 (set-buffer-modified-p nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1805
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1806 ((string-match "\\.java$" (buffer-file-name))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1807 (save-excursion
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1808 (ethio-java-to-fidel-buffer)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1809 (set-buffer-modified-p nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1810
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1811 (t
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1812 nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1813
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1814 ;;;###autoload
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1815 (defun ethio-write-file nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1816 "Transcribe Ethiopic characters in ASCII depending on the file extension."
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1817 (cond
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1818
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1819 ((string-match "\\.sera$" (buffer-file-name))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1820 (save-excursion
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1821 (ethio-fidel-to-sera-buffer nil 'force)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1822 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1823 (ethio-record-user-preference)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1824 (set-buffer-modified-p nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1825
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1826 ((string-match "\\.html$" (buffer-file-name))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1827 (save-excursion
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1828 (let ((sera-being-called-by-w3 t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1829 (lq (aref ethio-fidel-to-sera-map 461))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1830 (rq (aref ethio-fidel-to-sera-map 462)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1831 (aset ethio-fidel-to-sera-map 461 "&laquote;")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1832 (aset ethio-fidel-to-sera-map 462 "&raquote;")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1833 (ethio-fidel-to-sera-marker 'force)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1834 (goto-char (point-min))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1835 (if (search-forward "<sera>" nil t)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1836 (ethio-record-user-preference))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1837 (aset ethio-fidel-to-sera-map 461 lq)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1838 (aset ethio-fidel-to-sera-map 462 rq)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1839 (set-buffer-modified-p nil))))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1840
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1841 ((string-match "\\.tex$" (buffer-file-name))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1842 (save-excursion
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1843 (ethio-fidel-to-tex-buffer)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1844 (set-buffer-modified-p nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1845
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1846 ((string-match "\\.java$" (buffer-file-name))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1847 (save-excursion
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1848 (ethio-fidel-to-java-buffer)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1849 (set-buffer-modified-p nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1850
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1851 (t
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1852 nil)))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1853
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1854 (defun ethio-record-user-preference nil
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1855 (if (looking-at "\\\\~\\(tir?\\|amh?\\) ")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1856 (goto-char (match-end 0))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1857 (insert (if (ethio-prefer-amharic-p) "\\~amh " "\\~tir ")))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1858 (insert (if ethio-use-colon-for-colon "\\~-: " "\\~`: ")
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1859 (if ethio-use-three-dot-question "\\~`| " "\\~`? ")))
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1860
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1861 (add-hook 'find-file-hooks 'ethio-find-file)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1862 (add-hook 'write-file-hooks 'ethio-write-file)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1863 (add-hook 'after-save-hook 'ethio-find-file)
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1864
1d2c8b8a2875 Completely updated.
Kenichi Handa <handa@m17n.org>
parents: 17071
diff changeset
1865 ;;
17052
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1866 (provide 'language/ethio-util)
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1867
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1868 ;;; Local Variables:
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1869 ;;; generated-autoload-file: "../loaddefs.el"
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1870 ;;; End:
d0d7b244b1d0 Initial revision
Karl Heuer <kwzh@gnu.org>
parents:
diff changeset
1871 ;;; ethio-util.el ends here