Mercurial > emacs
annotate leim/quail/lrt.el @ 56120:20c0cc3a95d9
(INFO_TARGETS, DVI_TARGETS, ../info/emacs-xtra): Add emacs-xtra.
author | Luc Teirlinck <teirllm@auburn.edu> |
---|---|
date | Tue, 15 Jun 2004 21:01:44 +0000 |
parents | 695cf19ef79e |
children | 23a17af379b1 375f2633d815 |
rev | line source |
---|---|
40710 | 1 ;;; lrt.el --- Quail package for inputting Lao characters by LRT method -*-coding: iso-2022-7bit;-*- |
18673 | 2 |
3 ;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN. | |
4 ;; Licensed to the Free Software Foundation. | |
5 | |
6 ;; Keywords: multilingual, input method, Lao, LRT. | |
7 | |
8 ;; This file is part of GNU Emacs. | |
9 | |
10 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
11 ;; it under the terms of the GNU General Public License as published by | |
12 ;; the Free Software Foundation; either version 2, or (at your option) | |
13 ;; any later version. | |
14 | |
15 ;; GNU Emacs is distributed in the hope that it will be useful, | |
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 ;; GNU General Public License for more details. | |
19 | |
20 ;; You should have received a copy of the GNU General Public License | |
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
23 ;; Boston, MA 02111-1307, USA. | |
24 | |
38453
519983161a46
Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents:
26881
diff
changeset
|
25 ;;; Commentary: |
519983161a46
Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents:
26881
diff
changeset
|
26 |
18673 | 27 ;;; Code: |
28 | |
29 (require 'quail) | |
30 (require 'lao-util) | |
31 | |
32 ;; LRT (Lao Roman Transcription) input method accepts the following | |
33 ;; key sequence: | |
34 ;; consonant [+ semi-vowel-sign-lo ] + vowel [+ maa-sakod ] [+ tone-mark ] | |
35 | |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
36 (defun quail-lao-update-translation (control-flag) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
37 (if (integerp control-flag) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
38 ;; Non-composable character typed. |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
39 (setq quail-current-str |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
40 (buffer-substring (overlay-start quail-overlay) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
41 (overlay-end quail-overlay)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
42 unread-command-events |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
43 (string-to-list |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
44 (substring quail-current-key control-flag))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
45 (let ((lao-str (lao-transcribe-roman-to-lao-string quail-current-key))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
46 (if (> (aref lao-str 0) 255) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
47 (setq quail-current-str lao-str) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
48 (or quail-current-str |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
49 (setq quail-current-str quail-current-key))))) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
50 control-flag) |
18673 | 51 |
52 | |
53 (quail-define-package | |
19260
2d94069b1e81
Change title string of input method "lao-lrt".
Kenichi Handa <handa@m17n.org>
parents:
18833
diff
changeset
|
54 "lao-lrt" "Lao" "(1E(BR" t |
19373
314fa41f0155
(lrt-vowel-table): Some elements corrected.
Kenichi Handa <handa@m17n.org>
parents:
19260
diff
changeset
|
55 "Lao input method using LRT (Lao Roman Transcription). |
314fa41f0155
(lrt-vowel-table): Some elements corrected.
Kenichi Handa <handa@m17n.org>
parents:
19260
diff
changeset
|
56 `\\' (backslash) + number-key => (1p(B,(1q(B,(1r(B,... LAO DIGIT ZERO, ONE, TWO, ... |
314fa41f0155
(lrt-vowel-table): Some elements corrected.
Kenichi Handa <handa@m17n.org>
parents:
19260
diff
changeset
|
57 `\\' (backslash) + `\\' => (1f(B LAO KO LA (REPETITION) |
314fa41f0155
(lrt-vowel-table): Some elements corrected.
Kenichi Handa <handa@m17n.org>
parents:
19260
diff
changeset
|
58 `\\' (backslash) + `$' => (1O(B LAO ELLIPSIS |
314fa41f0155
(lrt-vowel-table): Some elements corrected.
Kenichi Handa <handa@m17n.org>
parents:
19260
diff
changeset
|
59 " |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
60 nil 'forget-last-selection 'deterministic 'kbd-translate 'show-layout |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
61 nil nil nil 'quail-lao-update-translation nil t) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
62 |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
63 ;; LRT (Lao Roman Transcription) input method accepts the following |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
64 ;; key sequence: |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
65 ;; consonant [ semi-vowel-sign-lo ] vowel [ maa-sakod ] [ tone-mark ] |
18673 | 66 |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
67 (quail-install-map |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
68 (quail-map-from-table |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
69 '((base-state (lao-transcription-consonant-alist . sv-state) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
70 lao-transcription-vowel-alist |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
71 lao-transcription-tone-alist) |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
40710
diff
changeset
|
72 (sv-state (lao-transcription-semi-vowel-alist . v-state) |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
73 (lao-transcription-vowel-alist . mt-state)) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
74 (v-state (lao-transcription-vowel-alist . mt-state)) |
49600
23a1cea22d13
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
40710
diff
changeset
|
75 (mt-state (lao-transcription-maa-sakod-alist . t-state) |
26881
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
76 lao-transcription-tone-alist) |
cd1cb9bf30e1
Rewritten for new composition.
Kenichi Handa <handa@m17n.org>
parents:
21384
diff
changeset
|
77 (t-state lao-transcription-tone-alist)))) |
19260
2d94069b1e81
Change title string of input method "lao-lrt".
Kenichi Handa <handa@m17n.org>
parents:
18833
diff
changeset
|
78 |
52401 | 79 ;;; arch-tag: f65e4038-e187-4906-997b-d2de7ed813d2 |
38453
519983161a46
Some fixes to follow lisp coding conventions and typo fixes.
Pavel Janík <Pavel@Janik.cz>
parents:
26881
diff
changeset
|
80 ;;; lrt.el ends here |