changeset 54999:894e3fd388c2

(quail-lookup-key): New optional arg NOT-RESET-INDICES. (quail-get-translations): Call quail-lookup-key with NOT-RESET-INDICES t. (quail-completion): Likewise. (quail-lookup-map-and-concat): Likewise.
author Kenichi Handa <handa@m17n.org>
date Tue, 20 Apr 2004 08:18:02 +0000
parents a9da0517d087
children 9bc85207b164
files lisp/international/quail.el
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/international/quail.el	Tue Apr 20 07:15:39 2004 +0000
+++ b/lisp/international/quail.el	Tue Apr 20 08:18:02 2004 +0000
@@ -1218,7 +1218,7 @@
    (t
     (error "Invalid object in Quail map: %s" def))))
 
-(defun quail-lookup-key (key &optional len)
+(defun quail-lookup-key (key &optional len not-reset-indices)
   "Lookup KEY of length LEN in the current Quail map and return the definition.
 The returned value is a Quail map specific to KEY."
   (or len
@@ -1256,7 +1256,7 @@
 	  (if (and (consp translation) (vectorp (cdr translation)))
 	      (progn
 		(setq quail-current-translations translation)
-		(if (quail-forget-last-selection)
+		(if (and (not not-reset-indices) (quail-forget-last-selection))
 		    (setcar (car quail-current-translations) 0))))))
     ;; We may have to reform cdr part of MAP.
     (if (and (cdr map) (functionp (cdr map)))
@@ -2043,7 +2043,7 @@
 
 (defun quail-get-translations ()
   "Return a string containing the current possible translations."
-  (let ((map (quail-lookup-key quail-current-key))
+  (let ((map (quail-lookup-key quail-current-key nil t))
 	(str (copy-sequence quail-current-key)))
     (if quail-current-translations
 	(quail-update-current-translations))
@@ -2114,7 +2114,7 @@
   (quail-setup-completion-buf)
   (let ((win (get-buffer-window quail-completion-buf 'visible))
 	(key quail-current-key)
-	(map (quail-lookup-key quail-current-key))
+	(map (quail-lookup-key quail-current-key nil t))
 	(require-update nil))
     (with-current-buffer quail-completion-buf
       (if (and win
@@ -2695,7 +2695,7 @@
 	 (translation-list nil)
 	 map)
     (while (> len 0)
-      (setq map (quail-lookup-key key len)
+      (setq map (quail-lookup-key key len t)
 	    len (1- len))
       (if map
 	  (let* ((def (quail-map-definition map))