Function: quail-completion-list-translations
quail-completion-list-translations is a byte-compiled function defined
in quail.el.gz.
Signature
(quail-completion-list-translations MAP KEY INDENT)
Documentation
List all possible translations of KEY in Quail MAP with indentation INDENT.
Source Code
;; Defined in /usr/src/emacs/lisp/international/quail.el.gz
(defun quail-completion-list-translations (map key indent)
"List all possible translations of KEY in Quail MAP with indentation INDENT."
(let (beg (translations
(quail-get-translation (car map) key (length key))))
(if (integerp translations)
(progn
(insert "(1/1) 1.")
;; Endow the character `translations' with `mouse-face' text
;; property to enable `mouse-2' completion.
(setq beg (point))
(insert translations)
(put-text-property beg (point) 'mouse-face 'highlight)
(insert "\n"))
;; We need only vector part.
(setq translations (cdr translations))
;; Insert every 10 elements with indices in a line.
(let ((len (length translations))
(i 0))
(while (< i len)
(when (zerop (% i 10))
(when (>= i 10)
(insert "\n")
(quail-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." (% (1+ i) 10)))
(setq beg (point))
(insert (aref translations i))
;; Passing the mouse over a character will highlight.
(put-text-property beg (point) 'mouse-face 'highlight)
(setq i (1+ i)))
(insert "\n")))))