to be included in the other Vietnamese input method (e.g. vi-telex, vi-vni).
")
-;;; 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)
("0" ?0) ("1" ?1) ("2" ?2) ("3" ?3) ("4" ?4)
("5" ?5) ("6" ?6) ("7" ?7) ("8" ?8) ("9" ?9))
+ (smart-quotes
+ ("'" ?\')
+ ("''" "‘’")
+ ("\"" ?\")
+ ("\"\"" "“”"))
+
(permanent-escape
("\\"))