to be included in the other Vietnamese input method (e.g. vi-telex, vi-vni).
")
-(description (_"Vietnames input method using the TELEX key sequence.
-Typing Backslash ('\\') toggles the normal mode and English mode.
-The following variables are customizable:
- tone-mark-on-last: control tone mark position in equivocal cases
- backspace-is-undo: control the action of Backspace key (delete or undo)"))
-
-;;; Usage of variables:
-;;; M (mark): point after the last vowel
-;;; T (mark): point after the tone-mark-attached vowel
-;;; TPLACE: On which vowel a tone is attached (0:none, 1:1st, 2:2nd, or 3:3rd)
-;;; C: The initial consonant
-;;; V-1: The last vowel
-;;; V-2: The second from the last vowel (or 0 if there aren't two vowels)
-;;; V-3: The third from the last vowel (or 0 if there aren't three vowels)
-;;; C-AFTER-V: Number of the final consonants
-;;; SELECT: Which tone is selected
+;; Usage of variables:
+;; M (mark): point after the last vowel
+;; T (mark): point after the tone-mark-attached vowel
+;; TPLACE: On which vowel a tone is attached (0:none, 1:1st, 2:2nd, or 3:3rd)
+;; C: The initial consonant
+;; V-1: The last vowel
+;; V-2: The second from the last vowel (or 0 if there aren't two vowels)
+;; V-3: The third from the last vowel (or 0 if there aren't three vowels)
+;; C-AFTER-V: Number of the final consonants
+;; SELECT: Which tone is selected
(macro
(handle-mark
("n" ?n) ("p" ?p) ("q" ?q) ("t" ?t) ("v" ?v)
("B" ?B) ("C" ?C) ("D" ?D) ("G" ?G) ("H" ?H) ("K" ?K) ("L" ?L) ("M" ?M)
("N" ?N) ("P" ?P) ("Q" ?Q) ("T" ?T) ("V" ?V))
+ ;;Khi cac phu am nay di sau nguyen am thi nen thoat ve tieng Anh
+ ;;Should switch to English when these consonants are after any vowel (set temporary-escape)
+ (ending-1st-notviet-consonant ;
+ ("q" ?q) ("Q" ?Q) ("d" ?d) ("D" ?D) ("g" ?g) ("G" ?G) ("h" ?h) ("H" ?H)
+ ("k" ?k) ("K" ?K) ("l" ?l) ("L" ?L) ("v" ?v) ("V" ?V) ("b" ?b) ("B" ?B) ("z" ?z) ("Z" ?Z))
+ ;; These are the consonants that can end a word, anything else is not VNese
+ (ending-1st-consonant ; (e.g. tốt, đẹp, xấu)
+ ("c" ?c) ("m" ?m) ("n" ?n) ("p" ?p) ("t" ?t)
+ ("C" ?C) ("M" ?M) ("N" ?N) ("P" ?P) ("T" ?T))
+ (ending-2nd-consonant ; Can only go with 'n' or 'c' (e.g. sóng, sang, ích)
+ ("g" ?g) ("h" ?h)
+ ("G" ?G) ("H" ?H))
(alnum
("a" ?a) ("b" ?b) ("c" ?c) ("d" ?d) ("e" ?e) ("f" ?f) ("g" ?g)
("0" ?0) ("1" ?1) ("2" ?2) ("3" ?3) ("4" ?4)
("5" ?5) ("6" ?6) ("7" ?7) ("8" ?8) ("9" ?9))
+ (smart-quotes
+ ("'" ?\')
+ ("''" "‘’")
+ ("\"" ?\")
+ ("\"\"" "“”"))
+
(permanent-escape
("\\"))