Trailing whitespace deleted.
[bpt/emacs.git] / leim / quail / lrt.el
CommitLineData
123f4a5e 1;;; lrt.el --- Quail package for inputting Lao characters by LRT method -*-coding: iso-2022-7bit;-*-
24b31c88
KH
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
be567141
PJ
25;;; Commentary:
26
24b31c88
KH
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
653b6bad
KH
36(defun quail-lao-update-translation (control-flag)
37 (if (integerp control-flag)
38 ;; Non-composable character typed.
39 (setq quail-current-str
40 (buffer-substring (overlay-start quail-overlay)
41 (overlay-end quail-overlay))
42 unread-command-events
43 (string-to-list
44 (substring quail-current-key control-flag)))
45 (let ((lao-str (lao-transcribe-roman-to-lao-string quail-current-key)))
46 (if (> (aref lao-str 0) 255)
47 (setq quail-current-str lao-str)
48 (or quail-current-str
49 (setq quail-current-str quail-current-key)))))
50 control-flag)
24b31c88 51
24b31c88
KH
52
53(quail-define-package
f89752e9 54 "lao-lrt" "Lao" "\e(1E\e(BR" t
5d0c3ab6
KH
55 "Lao input method using LRT (Lao Roman Transcription).
56`\\' (backslash) + number-key => \e(1p\e(B,\e(1q\e(B,\e(1r\e(B,... LAO DIGIT ZERO, ONE, TWO, ...
57`\\' (backslash) + `\\' => \e(1f\e(B LAO KO LA (REPETITION)
58`\\' (backslash) + `$' => \e(1O\e(B LAO ELLIPSIS
59"
653b6bad
KH
60 nil 'forget-last-selection 'deterministic 'kbd-translate 'show-layout
61 nil nil nil 'quail-lao-update-translation nil t)
f89752e9 62
653b6bad
KH
63;; LRT (Lao Roman Transcription) input method accepts the following
64;; key sequence:
65;; consonant [ semi-vowel-sign-lo ] vowel [ maa-sakod ] [ tone-mark ]
66
67(quail-install-map
68 (quail-map-from-table
69 '((base-state (lao-transcription-consonant-alist . sv-state)
70 lao-transcription-vowel-alist
71 lao-transcription-tone-alist)
177c0ea7 72 (sv-state (lao-transcription-semi-vowel-alist . v-state)
653b6bad
KH
73 (lao-transcription-vowel-alist . mt-state))
74 (v-state (lao-transcription-vowel-alist . mt-state))
177c0ea7 75 (mt-state (lao-transcription-maa-sakod-alist . t-state)
653b6bad
KH
76 lao-transcription-tone-alist)
77 (t-state lao-transcription-tone-alist))))
f89752e9 78
be567141 79;;; lrt.el ends here