# HG changeset patch # User Juri Linkov # Date 1258652394 0 # Node ID 62c0a89cd695deddf128062ec8eea544770cfc16 # Parent fdcf81336623c82b4e4adbd773616e4c291518ef (switch-to-completions): Move point to the first completion when point was at the beginning of the buffer. diff -r fdcf81336623 -r 62c0a89cd695 lisp/simple.el --- a/lisp/simple.el Thu Nov 19 17:39:14 2009 +0000 +++ b/lisp/simple.el Thu Nov 19 17:39:54 2009 +0000 @@ -6032,14 +6032,15 @@ "Select the completion list window." (interactive) (let ((window (or (get-buffer-window "*Completions*" 0) - ;; Make sure we have a completions window. + ;; 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)))) + ;; In the new buffer, go to the first completion. + ;; FIXME: Perhaps this should be done in `minibuffer-completion-help'. + (when (bobp) + (next-completion 1))))) ;;; Support keyboard commands to turn on various modifiers.