Move runtime leim lisp files to lisp/leim directory
[bpt/emacs.git] / lisp / leim / quail / lrt.el
CommitLineData
4b725a70 1;;; lrt.el --- Quail package for inputting Lao characters by LRT method -*-coding: utf-8;-*-
24b31c88 2
ab422c4d 3;; Copyright (C) 1998, 2001-2013 Free Software Foundation, Inc.
03ba6797 4;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
5df4f04c 5;; 2006, 2007, 2008, 2009, 2010, 2011
698218a2
KH
6;; National Institute of Advanced Industrial Science and Technology (AIST)
7;; Registration Number H14PRO021
24b31c88
KH
8
9;; Keywords: multilingual, input method, Lao, LRT.
10
11;; This file is part of GNU Emacs.
12
3d544458 13;; GNU Emacs is free software: you can redistribute it and/or modify
24b31c88 14;; it under the terms of the GNU General Public License as published by
3d544458
GM
15;; the Free Software Foundation, either version 3 of the License, or
16;; (at your option) any later version.
24b31c88
KH
17
18;; GNU Emacs is distributed in the hope that it will be useful,
19;; but WITHOUT ANY WARRANTY; without even the implied warranty of
20;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;; GNU General Public License for more details.
22
23;; You should have received a copy of the GNU General Public License
3d544458 24;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
24b31c88 25
be567141
PJ
26;;; Commentary:
27
24b31c88
KH
28;;; Code:
29
30(require 'quail)
31(require 'lao-util)
32
33;; LRT (Lao Roman Transcription) input method accepts the following
34;; key sequence:
35;; consonant [+ semi-vowel-sign-lo ] + vowel [+ maa-sakod ] [+ tone-mark ]
36
653b6bad
KH
37(defun quail-lao-update-translation (control-flag)
38 (if (integerp control-flag)
39 ;; Non-composable character typed.
40 (setq quail-current-str
41 (buffer-substring (overlay-start quail-overlay)
42 (overlay-end quail-overlay))
43 unread-command-events
44 (string-to-list
45 (substring quail-current-key control-flag)))
46 (let ((lao-str (lao-transcribe-roman-to-lao-string quail-current-key)))
47 (if (> (aref lao-str 0) 255)
48 (setq quail-current-str lao-str)
49 (or quail-current-str
50 (setq quail-current-str quail-current-key)))))
51 control-flag)
24b31c88 52
24b31c88
KH
53
54(quail-define-package
4b725a70 55 "lao-lrt" "Lao" "ລR" t
5d0c3ab6 56 "Lao input method using LRT (Lao Roman Transcription).
4b725a70
PE
57`\\' (backslash) + number-key => ໐,໑,໒,... LAO DIGIT ZERO, ONE, TWO, ...
58`\\' (backslash) + `\\' => ໆ LAO KO LA (REPETITION)
59`\\' (backslash) + `$' => ຯ LAO ELLIPSIS
5d0c3ab6 60"
653b6bad
KH
61 nil 'forget-last-selection 'deterministic 'kbd-translate 'show-layout
62 nil nil nil 'quail-lao-update-translation nil t)
f89752e9 63
653b6bad
KH
64;; LRT (Lao Roman Transcription) input method accepts the following
65;; key sequence:
66;; consonant [ semi-vowel-sign-lo ] vowel [ maa-sakod ] [ tone-mark ]
67
68(quail-install-map
69 (quail-map-from-table
70 '((base-state (lao-transcription-consonant-alist . sv-state)
71 lao-transcription-vowel-alist
72 lao-transcription-tone-alist)
177c0ea7 73 (sv-state (lao-transcription-semi-vowel-alist . v-state)
653b6bad
KH
74 (lao-transcription-vowel-alist . mt-state))
75 (v-state (lao-transcription-vowel-alist . mt-state))
177c0ea7 76 (mt-state (lao-transcription-maa-sakod-alist . t-state)
653b6bad
KH
77 lao-transcription-tone-alist)
78 (t-state lao-transcription-tone-alist))))
f89752e9 79
be567141 80;;; lrt.el ends here