;; Upper vowels and tone-marks are put on the letter.
;; Semi-vowel-sign-lo and lower vowels are put under the letter.
(defconst lrt-single-consonant-table
- '(("k" . ?\e(1!\e(B)
+ `(("k" . ?\e(1!\e(B)
("kh" . ?\e(1"\e(B)
("qh" . ?\e(1$\e(B)
("ng" . ?\e(1'\e(B)
("h" . ?\e(1N\e(B)
("nh" . ?\e(1|\e(B)
("mh" . ?\e(1}\e(B)
- ("lh" . ?\e0\e(1K\\e1\e(B)
+ ("lh" . "\e0\e(1K\\e1\e(B")
))
;; Semi-vowel-sign-lo is put under the first letter.
("or" "\e(1m\e(B" (0 ?\e(1m\e(B) (0 ?\e(1M\e(B))
("er" "\e(1`\e(B \e(1T\e(B" (?\e(1`\e(B 0 ?\e(1T\e(B))
("ir" "\e(1`\e(B \e(1U\e(B" (?\e(1`\e(B 0 ?\e(1U\e(B))
- ("oua" "\e(1[GP\e(B" (0 ?\e(1[\e(B ?\e(1G\e(B ?\e(1P\e(B) (0 ?\e(1Q\e(B ?\e(1G\e(B))
- ("ua" "\e(1[G\e(B" (0 ?\e(1[\e(B ?\e(1G\e(B) (0 ?\e(1G\e(B))
+ ("ua" "\e(1[GP\e(B" (0 ?\e(1[\e(B ?\e(1G\e(B ?\e(1P\e(B) (0 ?\e(1Q\e(B ?\e(1G\e(B))
+ ("uaa" "\e(1[G\e(B" (0 ?\e(1[\e(B ?\e(1G\e(B) (0 ?\e(1G\e(B))
("ie" "\e(1`Q]P\e(B" (?\e(1`\e(B 0 ?\e(1Q\e(B ?\e(1]\e(B ?\e(1P\e(B) (0 ?\e(1Q\e(B ?\e(1]\e(B))
("ia" "\e(1`Q]\e(B" (?\e(1`\e(B 0 ?\e(1Q\e(B ?\e(1]\e(B) (0 ?\e(1]\e(B))
- ("eua" "\e(1`VM\e(B" (?\e(1`\e(B 0 ?\e(1V\e(B ?\e(1M\e(B))
- ("ea" "\e(1`WM\e(B" (?\e(1`\e(B 0 ?\e(1W\e(B ?\e(1M\e(B))
+ ("ea" "\e(1`VM\e(B" (?\e(1`\e(B 0 ?\e(1V\e(B ?\e(1M\e(B))
+ ("eaa" "\e(1`WM\e(B" (?\e(1`\e(B 0 ?\e(1W\e(B ?\e(1M\e(B))
("ai" "\e(1d\e(B" (?\e(1d\e(B 0))
("ei" "\e(1c\e(B" (?\e(1c\e(B 0))
("ao" "\e(1`[R\e(B" (?\e(1`\e(B 0 ?\e(1[\e(B ?\e(1R\e(B))
- ("arm" "\e(1S\e(B" (?\e(1S\e(B 0))))
+ ("aM" "\e(1S\e(B" (?\e(1S\e(B 0))))
;; Maa-sakod is put at the tail.
(defconst lrt-maa-sakod-table
(defun lrt-composing-pattern-double-c (str semi-vowel vowel-pattern)
(let* ((patterns (copy-sequence vowel-pattern))
(tail patterns)
- (chars (string-to-list str))
+ (chars (string-to-list
+ (if (= (chars-in-string str) 1)
+ (decompose-string str)
+ str)))
place)
;; Embed C and SEMI-VOWEL (if any) at the place of 0.
(while tail
(quail-delete-region)
(setq quail-current-str (lrt-compose-string maa-sakod-pattern))
(insert quail-current-str)
- (setq quail-current-key " ")
(quail-show-translations)
(setq quail-current-data (list nil maa-sakod-pattern))))))
;; have already done it.
(nth 1 quail-current-data)))
(tail tone-mark-pattern)
- (double-consonant-tail '(?\e(1'\e(B ?\e(1]\e(B ?\e(1G\e(B ?\e(1E\e(B ?\e(1-\e(B ?\e(19\e(B ?\e(1A\e(B))
+ (double-consonant-keys lrt-double-consonant-table)
+ (double-consonant-flag nil)
place)
+
+ ;; Set DOUBLE-CONSONANT-FLAG to t if a user entered a double
+ ;; consonant.
+ (while (and double-consonant-keys (not double-consonant-flag))
+ (setq double-consonant-flag
+ (eq (string-match (car (car double-consonant-keys))
+ quail-current-key)
+ 0)
+ double-consonant-keys (cdr double-consonant-keys)))
+
;; Find a place to embed TONE-MARK. It should be after a
- ;; single or double consonant and following vowels.
+ ;; single or double consonant and following upper or lower vowels.
(while (and tail (not place))
(if (and
(eq (get-char-code-property (car tail) 'phonetic-type)
'consonant)
;; Skip `\e(1K\e(B' if it is the first letter of double consonant.
- (or (/= (car tail) ?\e(1K\e(B)
- (not (cdr tail))
- (not
- (if (= (car (cdr tail)) ?\e(1\\e(B)
- (and (cdr (cdr tail))
- (memq (car (cdr (cdr tail))) double-consonant-tail))
- (memq (car (cdr tail)) double-consonant-tail)))))
+ (or (not double-consonant-flag)
+ (/= (car tail) ?\e(1K\e(B)))
(progn
(setq place tail)
(setq tail (cdr tail))
(setq l1 lrt-single-consonant-table)
(while l1
(setq e1 (car l1))
- (quail-defrule-internal (car e1) (cdr e1) map)
+ (quail-defrule-internal (car e1) (vector (cdr e1)) map)
(quail-defrule-internal
(concat (car e1) semi-vowel-key)
- (compose-string (format "%c%c" (cdr e1) semi-vowel-char))
+ (if (stringp (cdr e1))
+ (compose-string (format "%s%c" (cdr e1) semi-vowel-char))
+ (compose-string (format "%c%c" (cdr e1) semi-vowel-char)))
map)
(setq l2 lrt-vowel-table)
(while l2
map)))
(quail-define-package
- "lao-lrt" "Lao" "\e(1"\e(BR" t
+ "lao-lrt" "Lao" "\e(1E\e(BR" t
"Lao input method using LRT (Lao Roman Transcription)"
'(("k" . lrt-handle-maa-sakod)
("g" . lrt-handle-maa-sakod)
'forget-last-selection 'deterministic 'kbd-translate 'show-layout)
(lrt-generate-quail-map)
+
+;; Additional key definitions for Lao digits.
+
+(quail-defrule "\\0" ?\e(1p\e(B)
+(quail-defrule "\\1" ?\e(1q\e(B)
+(quail-defrule "\\2" ?\e(1r\e(B)
+(quail-defrule "\\3" ?\e(1s\e(B)
+(quail-defrule "\\4" ?\e(1t\e(B)
+(quail-defrule "\\5" ?\e(1u\e(B)
+(quail-defrule "\\6" ?\e(1v\e(B)
+(quail-defrule "\\7" ?\e(1w\e(B)
+(quail-defrule "\\8" ?\e(1x\e(B)
+(quail-defrule "\\9" ?\e(1y\e(B)
+
+;;; quail/lrt.el ends here