emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master bec7fb2: New command ido-switch-to-completions.


From: Tassilo Horn
Subject: [Emacs-diffs] master bec7fb2: New command ido-switch-to-completions.
Date: Fri, 8 Mar 2019 14:00:56 -0500 (EST)

branch: master
commit bec7fb2988c98a4103cc77bebc454c81a89e0f49
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>

    New command ido-switch-to-completions.
    
    * lisp/ido.el (ido-switch-to-completions): New command.
---
 lisp/ido.el | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/lisp/ido.el b/lisp/ido.el
index c268289..0854014 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -3965,8 +3965,24 @@ If `ido-change-word-sub' cannot be found in WORD, return 
nil."
     (exit-minibuffer)
     t))
 
+;; This is a shameless copy of `switch-to-completions'.
+(defun ido-switch-to-completions ()
+  "Select the window showing `ido-completion-buffer'."
+  (interactive)
+  (let ((window (or (get-buffer-window ido-completion-buffer 0)
+                   ;; Make sure we have a completions window.
+                    (progn (ido-completion-help)
+                           (get-buffer-window ido-completion-buffer 0)))))
+    (when window
+      (select-window window)
+      ;; In the new buffer, go to the first completion.
+      ;; FIXME: Perhaps this should be done in `ido-completion-help'.
+      (when (bobp)
+       (next-completion 1)))))
+
+
 (defun ido-completion-help ()
-  "Show possible completions in a \"*File Completions*\" buffer."
+  "Show possible completions in the `ido-completion-buffer'."
   (interactive)
   (setq ido-rescan nil)
   (let ((temp-buf (and ido-completion-buffer



reply via email to

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