Function: minibuffer-next-completion

minibuffer-next-completion is an interactive and byte-compiled function defined in minibuffer.el.gz.

Signature

(minibuffer-next-completion &optional N VERTICAL)

Documentation

Move to the next item in its completions window from the minibuffer.

When the optional argument VERTICAL is non-nil, move vertically to the next item on the next line using next-line-completion. Otherwise, move to the next item horizontally using next-completion. When minibuffer-completion-auto-choose is non-nil, then also insert the selected completion candidate to the minibuffer.

View in manual

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/minibuffer.el.gz
(defun minibuffer-next-completion (&optional n vertical)
  "Move to the next item in its completions window from the minibuffer.
When the optional argument VERTICAL is non-nil, move vertically
to the next item on the next line using `next-line-completion'.
Otherwise, move to the next item horizontally using `next-completion'.
When `minibuffer-completion-auto-choose' is non-nil, then also
insert the selected completion candidate to the minibuffer."
  (interactive "p")
  (let ((auto-choose minibuffer-completion-auto-choose))
    (with-minibuffer-completions-window
      (when completions-highlight-face
        (setq-local cursor-face-highlight-nonselected-window t))
      (if vertical
          (next-line-completion (or n 1))
        (next-completion (or n 1)))
      (when auto-choose
        (let ((completion-auto-deselect nil))
          (choose-completion nil t t))))))