diff options
author | Kenichi Handa <handa@m17n.org> | 1998-05-18 01:01:00 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 1998-05-18 01:01:00 +0000 |
commit | 0548a7fdc2913ca0627e6566f356d0b115ced0be (patch) | |
tree | e061acd24108dfc79bf6667b8e1b23bbd46ad8ef /lisp | |
parent | bb9c978adcb64cc3da34d41c493ae63339c6d1d5 (diff) | |
download | emacs-0548a7fdc2913ca0627e6566f356d0b115ced0be.tar.gz emacs-0548a7fdc2913ca0627e6566f356d0b115ced0be.tar.bz2 emacs-0548a7fdc2913ca0627e6566f356d0b115ced0be.zip |
(quail-completion): Consecutive call of
this command scrolls the Quail completion buffer.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/international/quail.el | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/lisp/international/quail.el b/lisp/international/quail.el index c36f022796d..995ce40fd84 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -1637,16 +1637,31 @@ All possible translations of the current key and whole possible longer keys are shown." (interactive) (quail-setup-completion-buf) - (let ((key quail-current-key) - (map (quail-lookup-key quail-current-key))) + (let ((win (get-buffer-window quail-completion-buf 'visible)) + (key quail-current-key) + (map (quail-lookup-key quail-current-key)) + (require-update nil)) (save-excursion (set-buffer quail-completion-buf) - (erase-buffer) - (insert "Possible completion and corresponding translations are:\n") - (quail-completion-1 key map 1) - (goto-char (point-min)) - (display-buffer (current-buffer))) - (quail-update-guidance))) + (if (and win + (equal key quail-current-key) + (eq last-command 'quail-completion)) + ;; The window for Quail completion buffer has already been + ;; shown. We just scroll it appropriately. + (if (pos-visible-in-window-p (point-max) win) + (set-window-start win (point-min)) + (let ((other-window-scroll-buffer quail-completion-buf)) + (scroll-other-window))) + (setq quail-current-key key) + (erase-buffer) + (insert "Possible completion and corresponding translations are:\n") + (quail-completion-1 key map 1) + (goto-char (point-min)) + (display-buffer (current-buffer)) + (setq require-update t))) + (if require-update + (quail-update-guidance))) + (setq this-command 'quail-completion)) ;; List all completions of KEY in MAP with indentation INDENT. (defun quail-completion-1 (key map indent) |