summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-09-16 07:04:03 +0000
committerRichard M. Stallman <rms@gnu.org>1997-09-16 07:04:03 +0000
commit8c14aa224c8778085af7b832b8ed62d9990c44b8 (patch)
treedb9fbd9c71c0ee1394e96c14be3a72a61eae32b0
parent1fa1e1f500f6448680c01df95082d203f893e7f5 (diff)
downloademacs-8c14aa224c8778085af7b832b8ed62d9990c44b8.tar.gz
(quail-completion-list-translations): Fix
and simplify generation of translation list.
-rw-r--r--lisp/international/quail.el17
1 files changed, 6 insertions, 11 deletions
diff --git a/lisp/international/quail.el b/lisp/international/quail.el
index 07a21f9efd3..0a12d18546f 100644
--- a/lisp/international/quail.el
+++ b/lisp/international/quail.el
@@ -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)))))