Function: with-minibuffer-completions-window

with-minibuffer-completions-window is a macro defined in minibuffer.el.gz.

Signature

(with-minibuffer-completions-window &rest BODY)

Documentation

Execute the forms in BODY from the minibuffer in its completions window.

When used in a minibuffer window, select the window with completions, and execute the forms.

Source Code

;; Defined in /usr/src/emacs/lisp/minibuffer.el.gz
(defmacro with-minibuffer-completions-window (&rest body)
  "Execute the forms in BODY from the minibuffer in its completions window.
When used in a minibuffer window, select the window with completions,
and execute the forms."
  (declare (indent 0) (debug t))
  `(let ((window (or (minibuffer--completions-visible)
                     ;; Make sure we have a completions window.
                     (progn (minibuffer-completion-help)
                            (minibuffer--completions-visible)))))
     (when window
       (with-selected-window window
         (completion--lazy-insert-strings)
         ,@body))))