emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

switch-to-completions (was: Vertical completions)


From: Juri Linkov
Subject: switch-to-completions (was: Vertical completions)
Date: Wed, 18 Nov 2009 11:52:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (x86_64-pc-linux-gnu)

After scrolling with the help of `minibuffer-complete' or
`minibuffer-complete-backward' to the middle of a long list
of completions, and typing `M-v' or <prior> (bound to
`switch-to-completions') to select a completion item using
keyboard, point jumps to the beginning of the *Completions*
buffer, thus requiring to scroll to the middle of the list
again.  I suppose moving point to the first item is necessary
only in the new *Completions* buffer:

Index: lisp/simple.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/simple.el,v
retrieving revision 1.1030
diff -c -r1.1030 simple.el
*** lisp/simple.el      15 Nov 2009 15:32:18 -0000      1.1030
--- lisp/simple.el      18 Nov 2009 09:50:52 -0000
***************
*** 6032,6045 ****
    "Select the completion list window."
    (interactive)
    (let ((window (or (get-buffer-window "*Completions*" 0)
!   ;; Make sure we have a completions window.
                      (progn (minibuffer-completion-help)
                             (get-buffer-window "*Completions*" 0)))))
      (when window
        (select-window window)
!       (goto-char (point-min))
!       (search-forward "\n\n" nil t)
!       (forward-line 1))))
  
  ;;; Support keyboard commands to turn on various modifiers.
  
--- 6057,6071 ----
    "Select the completion list window."
    (interactive)
    (let ((window (or (get-buffer-window "*Completions*" 0)
!                   ;; Make sure we have a completions window.
                      (progn (minibuffer-completion-help)
                             (get-buffer-window "*Completions*" 0)))))
      (when window
        (select-window window)
!       ;; In the new buffer, go to the first completion.
!       (when (bobp)
!       (search-forward "\n\n" nil t)
!       (forward-line 1)))))
  
  ;;; Support keyboard commands to turn on various modifiers.

-- 
Juri Linkov
http://www.jurta.org/emacs/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]