Function: minibuffer-hide-completions

minibuffer-hide-completions is an interactive and byte-compiled function defined in minibuffer.el.gz.

Signature

(minibuffer-hide-completions)

Documentation

Get rid of an out-of-date *Completions* buffer.

Probably introduced at or before Emacs version 30.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/minibuffer.el.gz
(defun minibuffer-hide-completions ()
  "Get rid of an out-of-date *Completions* buffer."
  ;; FIXME: We could/should use minibuffer-scroll-window here, but it
  ;; can also point to the minibuffer-parent-window, so it's a bit tricky.
  (interactive)
  (when-let* ((win (minibuffer--completions-visible)))
    (with-selected-window win
      ;; Move point off any completions, so we don't move point there
      ;; again the next time `minibuffer-completion-help' is called.
      (goto-char (point-min))
      (bury-buffer))))