comparison lisp/international/quail.el @ 22124:10b3c1cd7f18

(quail-completion): Consecutive call of this command scrolls the Quail completion buffer.
author Kenichi Handa <handa@m17n.org>
date Mon, 18 May 1998 01:01:00 +0000
parents 1a80d464c77a
children 7cf2c3800e8f
comparison
equal deleted inserted replaced
22123:42a41d39c4fb 22124:10b3c1cd7f18
1635 "List all completions for the current key. 1635 "List all completions for the current key.
1636 All possible translations of the current key and whole possible longer keys 1636 All possible translations of the current key and whole possible longer keys
1637 are shown." 1637 are shown."
1638 (interactive) 1638 (interactive)
1639 (quail-setup-completion-buf) 1639 (quail-setup-completion-buf)
1640 (let ((key quail-current-key) 1640 (let ((win (get-buffer-window quail-completion-buf 'visible))
1641 (map (quail-lookup-key quail-current-key))) 1641 (key quail-current-key)
1642 (map (quail-lookup-key quail-current-key))
1643 (require-update nil))
1642 (save-excursion 1644 (save-excursion
1643 (set-buffer quail-completion-buf) 1645 (set-buffer quail-completion-buf)
1644 (erase-buffer) 1646 (if (and win
1645 (insert "Possible completion and corresponding translations are:\n") 1647 (equal key quail-current-key)
1646 (quail-completion-1 key map 1) 1648 (eq last-command 'quail-completion))
1647 (goto-char (point-min)) 1649 ;; The window for Quail completion buffer has already been
1648 (display-buffer (current-buffer))) 1650 ;; shown. We just scroll it appropriately.
1649 (quail-update-guidance))) 1651 (if (pos-visible-in-window-p (point-max) win)
1652 (set-window-start win (point-min))
1653 (let ((other-window-scroll-buffer quail-completion-buf))
1654 (scroll-other-window)))
1655 (setq quail-current-key key)
1656 (erase-buffer)
1657 (insert "Possible completion and corresponding translations are:\n")
1658 (quail-completion-1 key map 1)
1659 (goto-char (point-min))
1660 (display-buffer (current-buffer))
1661 (setq require-update t)))
1662 (if require-update
1663 (quail-update-guidance)))
1664 (setq this-command 'quail-completion))
1650 1665
1651 ;; List all completions of KEY in MAP with indentation INDENT. 1666 ;; List all completions of KEY in MAP with indentation INDENT.
1652 (defun quail-completion-1 (key map indent) 1667 (defun quail-completion-1 (key map indent)
1653 (let ((len (length key))) 1668 (let ((len (length key)))
1654 (indent-to indent) 1669 (indent-to indent)