From 1f1ce6abe8723512ff62a077b4e7687d37eca135 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 25 Oct 2005 06:13:01 +0000 Subject: [PATCH] (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. --- lisp/ChangeLog | 6 ++++++ lisp/international/quail.el | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index eaadd83db29..8ef8d2b823e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-10-25 Kenichi Handa + + * 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 * vc.el (vc-dired-mode): Extend comment for binding of diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 0f9cc8f231d..e706a26d641 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -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 -- 2.39.5