]> git.eshelyaron.com Git - emacs.git/commitdiff
(quail-lookup-key): New optional arg
authorKenichi Handa <handa@m17n.org>
Tue, 20 Apr 2004 08:20:26 +0000 (08:20 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 20 Apr 2004 08:20:26 +0000 (08:20 +0000)
NOT-RESET-INDICES.
(quail-get-translations): Call quail-lookup-key with
NOT-RESET-INDICES t.
(quail-completion): Likewise.
(quail-lookup-map-and-concat): Likewise.

lisp/ChangeLog
lisp/international/quail.el

index 575cb590008916aef48b5edd13e00fefe46bcd8a..e637f78d2aedfc0d71cf90b09ec3d5e289310127 100644 (file)
@@ -1,3 +1,12 @@
+2004-04-20  Kenichi Handa  <handa@m17n.org>
+
+       * international/quail.el (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.
+
 2004-04-20  Kenichi Handa  <handa@m17n.org>
 
        * international/quail.el (quail-update-translation): Don't insert
index cfd578fbc06bfdb99cd0265bc9244fc44bd14c26..9e289c300d9078c7c7e106c8bcb523cabb147816 100644 (file)
@@ -1218,7 +1218,7 @@ selected translation."
    (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 @@ The returned value is a Quail map specific to KEY."
          (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 @@ minibuffer and the selected frame has no other windows)."
 
 (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 @@ are shown (at most to the depth specified `quail-completion-max-depth')."
   (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 @@ function `quail-install-map' (which see)."
         (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))