Mercurial > emacs
comparison lisp/international/quail.el @ 66426:54f639048139
(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.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Tue, 25 Oct 2005 06:10:23 +0000 |
parents | ed770a0a7846 |
children | 2c4be4c0eb6f |
comparison
equal
deleted
inserted
replaced
66425:3dcbac116732 | 66426:54f639048139 |
---|---|
1718 (setq ch (if (= ch ?0) 9 (- ch ?1))) | 1718 (setq ch (if (= ch ?0) 9 (- ch ?1))) |
1719 (quail-update-current-translations ch) | 1719 (quail-update-current-translations ch) |
1720 ;; And, we can terminate the current translation. | 1720 ;; And, we can terminate the current translation. |
1721 t) | 1721 t) |
1722 | 1722 |
1723 ((quail-deterministic) | |
1724 ;; No way to handle the last character in this context. | |
1725 ;; Commit the longest successfully translated characters, and | |
1726 ;; handle the remaining characters in a new loop. | |
1727 (setq def nil) | |
1728 (while (and (not def) (> len 1)) | |
1729 (setq len (1- len)) | |
1730 (setq def (quail-map-definition | |
1731 (quail-lookup-key quail-current-key len)))) | |
1732 (if def (setq quail-current-str | |
1733 (quail-get-current-str len def)) | |
1734 (setq quail-current-str (aref quail-current-key 0))) | |
1735 len) | |
1736 | |
1723 (t | 1737 (t |
1724 ;; No way to handle the last character in this context. | 1738 ;; No way to handle the last character in this context. |
1725 (setq def (quail-map-definition | 1739 (setq def (quail-map-definition |
1726 (quail-lookup-key quail-current-key (1- len)))) | 1740 (quail-lookup-key quail-current-key (1- len)))) |
1727 (if def (setq quail-current-str | 1741 (if def (setq quail-current-str |