*** empty log message ***
[m17n/m17n-db.git] / MIM / vi-tcvn.mim
index aa98da7..0a9c2f0 100644 (file)
@@ -1,5 +1,5 @@
 ;; vi-tcvn.mim -- Input method for Vietnames with TCVN6064 key sequence
-;; Copyright (C) 2008
+;; Copyright (C) 2008, 2009, 2010
 ;;   National Institute of Advanced Industrial Science and Technology (AIST)
 ;;   Registration Number H15PRO112
 
@@ -73,9 +73,9 @@ If the value is 1, Backspace key undoes the previous key
   ("=" ?₫) ("==" ?=)
   ((A-1) ?1) ((A-2) ?2) ((A-3) ?3) ((A-4) ?4) ((A-5) ?5)
   ((A-6) ?6) ((A-7) ?7) ((A-8) ?8) ((A-9) ?9) ((A-0) ?0)
-  ((A--) ?-) ((A-=) ?=) ((A-\\) ?\\) ((A-[) ?[) ((A-]) ?])
-  ((A-!) ?!) ((A-@) ?@) ((A-#) ?#) ((A-$) ?$) ((A-%) ?%)
-  ((A-^) ?^) ((A-&) ?&) ((A-*) ?*) ((A-() ?\() ((A-)) ?\))
+  ((A--) ?-) ((A-=) ?=) ((A-\\) ?\\) ((A-\[) ?[) ((A-\]) ?])
+  ((A-!) ?!) ((A-@) ?@) ((A-\#) ?#) ((A-$) ?$) ((A-%) ?%)
+  ((A-^) ?^) ((A-&) ?&) ((A-*) ?*) ((A-\() ?\() ((A-\)) ?\))
   ((A-_) ?_) ((A-+) ?+) ((A-\|) ?\|) ((A-{) ?{) ((A-}) ?}))
 
  (temporary-escape
@@ -91,18 +91,25 @@ If the value is 1, Backspace key undoes the previous key
  (init
   ;; Initialize variables.  C is the initial consonant.  V-N is the
   ;; (N-1)th vowel from the last.  C-AFTER-V is a number of consonants
-  ;; typed after vowel.
+  ;; typed after vowel.  NST is 1 iff surrounding text is not supported.
   (t (set C @-1) (set V-1 0) (set V-2 0) (set V-3 0) (set C-AFTER-V 0)
-     (set SELECT 0))
+     (set SELECT 0) (set NST (= @-0 -2)))
 
-  (consonant (set C @-1))
-  (consonant-ext (set C @-1))
+  (consonant (set C @-1) (cond (NST (shift after-c))))
+  (consonant-ext (set C @-1) (cond (NST (shift after-c))))
   ;; Mark M remembers the preedit position after the last vowel.
   (vowel (mark M) (set V-2 V-1) (set V-1 @-1) (shift after-v))
   (vowel-ext (mark M) (set V-2 V-1) (set V-1 @-1) (shift after-v))
   (temporary-escape (shift temporary-escape))
   (permanent-escape (shift escape-in-normal-mode))
-  (misc))
+  (misc)
+  (smart-quotes))
+
+ ;; The state shifted to when an initial consonants is typed and
+ ;; surrounding text is not supported.
+ (after-c
+  (vowel (mark M) (set V-2 V-1) (set V-1 @-1) (shift after-v))
+  (vowel-ext (mark M) (set V-2 V-1) (set V-1 @-1) (shift after-v)))
 
  ;; The state shifted to when a vowel is typed.
  (after-v