Mercurial > emacs
comparison lisp/simple.el @ 105710:eb03599b0d98
(switch-to-completions): Look for *Completions* in other frames as well.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 22 Oct 2009 15:27:17 +0000 |
parents | 68686d39c93a |
children | 3f36e4d4d40c |
comparison
equal
deleted
inserted
replaced
105709:e044a3c6a7e6 | 105710:eb03599b0d98 |
---|---|
6022 (define-key minibuffer-local-completion-map "\M-v" 'switch-to-completions) | 6022 (define-key minibuffer-local-completion-map "\M-v" 'switch-to-completions) |
6023 | 6023 |
6024 (defun switch-to-completions () | 6024 (defun switch-to-completions () |
6025 "Select the completion list window." | 6025 "Select the completion list window." |
6026 (interactive) | 6026 (interactive) |
6027 (let ((window (or (get-buffer-window "*Completions*" 0) | |
6027 ;; Make sure we have a completions window. | 6028 ;; Make sure we have a completions window. |
6028 (or (get-buffer-window "*Completions*") | 6029 (progn (minibuffer-completion-help) |
6029 (minibuffer-completion-help)) | 6030 (get-buffer-window "*Completions*" 0))))) |
6030 (let ((window (get-buffer-window "*Completions*"))) | |
6031 (when window | 6031 (when window |
6032 (select-window window) | 6032 (select-window window) |
6033 (goto-char (point-min)) | 6033 (goto-char (point-min)) |
6034 (search-forward "\n\n" nil t) | 6034 (search-forward "\n\n" nil t) |
6035 (forward-line 1)))) | 6035 (forward-line 1)))) |