1 ;;; lrt.el --- Quail package for inputting Lao characters by LRT method -*-coding: utf-8;-*-
3 ;; Copyright (C) 1998, 2001-2018 Free Software Foundation, Inc.
4 ;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
5 ;; 2006, 2007, 2008, 2009, 2010, 2011
6 ;; National Institute of Advanced Industrial Science and Technology (AIST)
7 ;; Registration Number H14PRO021
9 ;; Keywords: multilingual, input method, Lao, LRT.
11 ;; This file is part of GNU Emacs.
13 ;; GNU Emacs is free software: you can redistribute it and/or modify
14 ;; it under the terms of the GNU General Public License as published by
15 ;; the Free Software Foundation, either version 3 of the License, or
16 ;; (at your option) any later version.
18 ;; GNU Emacs is distributed in the hope that it will be useful,
19 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ;; GNU General Public License for more details.
23 ;; You should have received a copy of the GNU General Public License
24 ;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
33 ;; LRT (Lao Roman Transcription) input method accepts the following
35 ;; consonant [+ semi-vowel-sign-lo ] + vowel [+ maa-sakod ] [+ tone-mark ]
37 (defun quail-lrt-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
))
45 (substring quail-current-key control-flag
)
46 unread-command-events
))
47 (let ((lao-str (lao-transcribe-roman-to-lao-string quail-current-key
)))
48 (if (> (aref lao-str
0) 255)
49 (setq quail-current-str lao-str
)
51 (setq quail-current-str quail-current-key
)))))
56 "lao-lrt" "Lao" "ລR" t
57 "Lao input method using LRT (Lao Roman Transcription).
58 `\\' (backslash) + number-key => ໐,໑,໒,... LAO DIGIT ZERO, ONE, TWO, ...
59 `\\' (backslash) + `\\' => ໆ LAO KO LA (REPETITION)
60 `\\' (backslash) + `$' => ຯ LAO ELLIPSIS
62 nil
'forget-last-selection
'deterministic
'kbd-translate
'show-layout
63 nil nil nil
'quail-lrt-update-translation nil t
)
65 ;; LRT (Lao Roman Transcription) input method accepts the following
67 ;; consonant [ semi-vowel-sign-lo ] vowel [ maa-sakod ] [ tone-mark ]
71 '((base-state (lao-transcription-consonant-alist . sv-state
)
72 lao-transcription-vowel-alist
73 lao-transcription-tone-alist
)
74 (sv-state (lao-transcription-semi-vowel-alist . v-state
)
75 (lao-transcription-vowel-alist . mt-state
))
76 (v-state (lao-transcription-vowel-alist . mt-state
))
77 (mt-state (lao-transcription-maa-sakod-alist . t-state
)
78 lao-transcription-tone-alist
)
79 (t-state lao-transcription-tone-alist
))))