]> git.eshelyaron.com Git - emacs.git/commitdiff
(quail-completion-list-translations): Fix
authorRichard M. Stallman <rms@gnu.org>
Tue, 16 Sep 1997 07:04:03 +0000 (07:04 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 16 Sep 1997 07:04:03 +0000 (07:04 +0000)
and simplify generation of translation list.

lisp/international/quail.el

index 07a21f9efd3b690f4b1cd765706cf6fcef1c9bd1..0a12d18546fa1c3f7ee1824e93d5c372ca2f0613 100644 (file)
@@ -1659,21 +1659,16 @@ All possible translations of the current key and whole possible longer keys
       ;; Insert every 10 elements with indices in a line.
       (let ((len (length translations))
            (i 0)
-           (first t)
            num)
        (while (< i len)
-         (if first
-             (progn
-               (insert "(1/1)")
-               (setq first nil))
-           (if (= (% i 10) 0)
-               (progn
-                 (newline)
-                 (indent-to indent)
-                 (insert (format "(%d/%d)" (1+ (/ i 10)) (1+ (/ len 10)))))))
+         (when (zerop (% i 10))
+           (when (>= i 10)
+             (newline)
+             (indent-to indent))
+           (insert (format "(%d/%d)" (1+ (/ i 10)) (1+ (/ len 10)))))
          ;; We show the last digit of FROM while converting
          ;; 0,1,..,9 to 1,2,..,0.
-         (insert (format " %d." (if (= (% i 10) 9) 0 (1+ (% i 10)))))
+         (insert (format " %d." (% (1+ i) 10)))
          (insert (aref translations i))
          (setq i (1+ i)))
        (newline)))))