From db1bfcd9091d7765cbc1990d26802ecf013f6772 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sat, 16 Apr 2022 17:17:05 +0200 Subject: [PATCH] Mention completion-wrap-movement in relevant commands * lisp/simple.el (previous-completion, next-completion): Mention `completion-wrap-movement'. --- doc/emacs/mini.texi | 2 ++ etc/NEWS | 1 + lisp/simple.el | 8 ++++++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index eebe284b09a..52856d71379 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -381,6 +381,8 @@ used with the completion list: @vindex minibuffer-completion-auto-choose @item M- @itemx @key{M-} +@findex previous-completion +@findex next-completion These keys will navigate through the completions displayed in the completions buffer. When @code{minibuffer-completion-auto-choose} is non-@code{nil} (which is the default), using these commands will diff --git a/etc/NEWS b/etc/NEWS index 35bb3987e68..45d88a5cb1e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -653,6 +653,7 @@ To enable this behavior, customize the user option 'second-tab', then the first 'TAB' will display "*Completions*", and the second one will switch to the "*Completions*" buffer. +--- *** New user option 'completion-wrap-movement'. When non-nil, the commands 'next-completion' and 'previous-completion' automatically wrap around on reaching the beginning or the end of diff --git a/lisp/simple.el b/lisp/simple.el index 2481d22ad13..bbab57703de 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -9208,14 +9208,18 @@ the completions is popped up and down." (defun previous-completion (n) "Move to the previous item in the completion list. With prefix argument N, move back N items (negative N means move -forward)." +forward). + +Also see the `completion-wrap-movement' variable." (interactive "p") (next-completion (- n))) (defun next-completion (n) "Move to the next item in the completion list. With prefix argument N, move N items (negative N means move -backward)." +backward). + +Also see the `completion-wrap-movement' variable." (interactive "p") (let ((prev (previous-single-property-change (point) 'mouse-face))) (goto-char (cond -- 2.30.2