Mercurial > emacs
diff lisp/international/quail.el @ 90261:7beb78bc1f8e
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-97
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 616-696)
- Add lisp/mh-e/.arch-inventory
- Update from CVS
- Merge from gnus--rel--5.10
- Update from CVS: lisp/smerge-mode.el: Add 'tools' to file keywords.
- lisp/gnus/ChangeLog: Remove duplicate entry
* gnus--rel--5.10 (patch 147-181)
- Update from CVS
- Merge from emacs--cvs-trunk--0
- Update from CVS: lisp/mml.el (mml-preview): Doc fix.
- Update from CVS: texi/message.texi: Fix default values.
- Update from CVS: texi/gnus.texi (RSS): Addition.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 16 Jan 2006 08:37:27 +0000 |
parents | ee12d75eb214 2c4be4c0eb6f |
children | c358d0861b16 |
line wrap: on
line diff
--- a/lisp/international/quail.el Mon Jan 16 06:59:21 2006 +0000 +++ b/lisp/international/quail.el Mon Jan 16 08:37:27 2006 +0000 @@ -1586,13 +1586,21 @@ (or (and (consp def) (aref (cdr def) (car (car def)))) def (and (> len 1) - (let ((str (quail-get-current-str - (1- len) - (quail-map-definition (quail-lookup-key - quail-current-key (1- len)))))) + (let* ((str (quail-get-current-str + (1- len) + (quail-map-definition (quail-lookup-key + quail-current-key (1- len))))) + (substr1 (substring quail-current-key (1- len) len)) + (str1 (and (quail-deterministic) + (quail-get-current-str + 1 + (quail-map-definition (quail-lookup-key + substr1 1)))))) (if str (concat (if (stringp str) str (char-to-string str)) - (substring quail-current-key (1- len) len))))))) + (if str1 + (if (stringp str1) str1 (char-to-string str1)) + substr1))))))) (defvar quail-guidance-translations-starting-column 20) @@ -1708,6 +1716,20 @@ ;; 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