]> git.eshelyaron.com Git - emacs.git/commitdiff
(quail-translate-key): If the input
authorKenichi Handa <handa@m17n.org>
Tue, 25 Oct 2005 06:13:01 +0000 (06:13 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 25 Oct 2005 06:13:01 +0000 (06:13 +0000)
method is deterministic and failed to handle the last key, restart
the key handling loop from an appropriate key.

lisp/ChangeLog
lisp/international/quail.el

index eaadd83db29eb2b8284ef98fcb3cbf60dbb2f2c2..8ef8d2b823ec47b356805afffc527c9d399856a3 100644 (file)
@@ -1,3 +1,9 @@
+2005-10-25  Kenichi Handa  <handa@m17n.org>
+
+       * international/quail.el (quail-translate-key): If the input
+       method is deterministic and failed to handle the last key, restart
+       the key handling loop from an appropriate key.
+
 2005-10-25  Michael Albinus  <michael.albinus@gmx.de>
 
        * vc.el (vc-dired-mode): Extend comment for binding of
index 0f9cc8f231d2ccceb71944d186f6bb79ffaad29e..e706a26d641ba3f0781821831eea9261b0bc96ea 100644 (file)
@@ -1720,6 +1720,20 @@ sequence counting from the head."
             ;; And, we can terminate the current translation.
             t)
 
+           ((quail-deterministic)
+            ;; No way to handle the last character in this context.
+            ;; Commit the longest successfully translated characters, and
+            ;; handle the remaining characters in a new loop.
+            (setq def nil)
+            (while (and (not def) (> len 1))
+              (setq len (1- len))
+              (setq def (quail-map-definition
+                         (quail-lookup-key quail-current-key len))))
+            (if def (setq quail-current-str
+                          (quail-get-current-str len def))
+              (setq quail-current-str (aref quail-current-key 0)))
+            len)
+
            (t
             ;; No way to handle the last character in this context.
             (setq def (quail-map-definition