]> git.eshelyaron.com Git - emacs.git/commitdiff
(switch-to-completions): Move point to the first
authorJuri Linkov <juri@jurta.org>
Thu, 19 Nov 2009 17:40:14 +0000 (17:40 +0000)
committerJuri Linkov <juri@jurta.org>
Thu, 19 Nov 2009 17:40:14 +0000 (17:40 +0000)
completion when point was at the beginning of the buffer.

lisp/ChangeLog
lisp/simple.el

index 9249454f5bd7dd2c63255b89dc9da6f2b3a4e93f..741a72dd6e68a301ba44f2e53bc0972e81d124aa 100644 (file)
@@ -1,3 +1,11 @@
+2009-11-19  Juri Linkov  <juri@jurta.org>
+
+       * minibuffer.el (completions-format): New defcustom.
+       (completion--insert-strings): Implement vertical format.
+
+       * simple.el (switch-to-completions): Move point to the first
+       completion when point was at the beginning of the buffer.
+
 2009-11-19  Juri Linkov  <juri@jurta.org>
 
        * find-dired.el (find-name-arg): Remove autoload.  (Bug#4387)
index 87e65eebce844477f3e57c8afd4a459b62b5841f..23811ad80fc813daf1942b54394d81c30250bfba 100644 (file)
@@ -6032,14 +6032,15 @@ select the completion near point.\n\n"))))))
   "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)))))
 \f
 ;;; Support keyboard commands to turn on various modifiers.