(cvs-enabledp): Ignore errors.
[emacs.git] / leim / quail / lrt.el
blobbdc1cc71cbf791add3a49b39d3bce4fc7416d338
1 ;;; quail/lrt.el --- Quail package for inputting Lao characters by LRT method
3 ;; Copyright (C) 1997 Electrotechnical Laboratory, JAPAN.
4 ;; Licensed to the Free Software Foundation.
6 ;; Keywords: multilingual, input method, Lao, LRT.
8 ;; This file is part of GNU Emacs.
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.
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.
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.
25 ;;; Code:
27 (require 'quail)
28 (require 'lao-util)
30 ;; LRT (Lao Roman Transcription) input method accepts the following
31 ;; key sequence:
32 ;; consonant [+ semi-vowel-sign-lo ] + vowel [+ maa-sakod ] [+ tone-mark ]
34 (defun quail-lao-update-translation (control-flag)
35 (if (integerp control-flag)
36 ;; Non-composable character typed.
37 (setq quail-current-str
38 (buffer-substring (overlay-start quail-overlay)
39 (overlay-end quail-overlay))
40 unread-command-events
41 (string-to-list
42 (substring quail-current-key control-flag)))
43 (let ((lao-str (lao-transcribe-roman-to-lao-string quail-current-key)))
44 (if (> (aref lao-str 0) 255)
45 (setq quail-current-str lao-str)
46 (or quail-current-str
47 (setq quail-current-str quail-current-key)))))
48 control-flag)
51 (quail-define-package
52 "lao-lrt" "Lao" "\e(1E\e(BR" t
53 "Lao input method using LRT (Lao Roman Transcription).
54 `\\' (backslash) + number-key => \e(1p\e(B,\e(1q\e(B,\e(1r\e(B,... LAO DIGIT ZERO, ONE, TWO, ...
55 `\\' (backslash) + `\\' => \e(1f\e(B LAO KO LA (REPETITION)
56 `\\' (backslash) + `$' => \e(1O\e(B LAO ELLIPSIS
58 nil 'forget-last-selection 'deterministic 'kbd-translate 'show-layout
59 nil nil nil 'quail-lao-update-translation nil t)
61 ;; LRT (Lao Roman Transcription) input method accepts the following
62 ;; key sequence:
63 ;; consonant [ semi-vowel-sign-lo ] vowel [ maa-sakod ] [ tone-mark ]
65 (quail-install-map
66 (quail-map-from-table
67 '((base-state (lao-transcription-consonant-alist . sv-state)
68 lao-transcription-vowel-alist
69 lao-transcription-tone-alist)
70 (sv-state (lao-transcription-semi-vowel-alist . v-state)
71 (lao-transcription-vowel-alist . mt-state))
72 (v-state (lao-transcription-vowel-alist . mt-state))
73 (mt-state (lao-transcription-maa-sakod-alist . t-state)
74 lao-transcription-tone-alist)
75 (t-state lao-transcription-tone-alist))))
77 ;;; quail/lrt.el ends here