]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/simple.el (completion-auto-wrap): Rename from completion-wrap-movement.
authorJuri Linkov <juri@linkov.net>
Tue, 14 Jun 2022 07:04:56 +0000 (10:04 +0300)
committerJuri Linkov <juri@linkov.net>
Tue, 14 Jun 2022 07:04:56 +0000 (10:04 +0300)
(next-completion): Use completion-auto-wrap.
https://lists.gnu.org/archive/html/emacs-devel/2022-06/msg00139.html

etc/NEWS
lisp/simple.el
test/lisp/minibuffer-tests.el

index 1b8560a92394895356c8b13936820b7a7cd2ee48..eb4c6956b81639c27b7e7dbbdeb47038ab17edf2 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1076,17 +1076,11 @@ To enable this behavior, customize the user option
 the second one will switch to the "*Completions*" buffer.
 
 ---
-*** New user option 'completion-wrap-movement'.
+*** New user option 'completion-auto-wrap'.
 When non-nil, the commands 'next-completion' and 'previous-completion'
 automatically wrap around on reaching the beginning or the end of
 the "*Completions*" buffer.
 
-+++
-*** New user option 'completions-sort'.
-This option controls the sorting of the completion candidates in
-the "*Completions*" buffer.  Available styles are no sorting,
-alphabetical (the default), or a custom sort function.
-
 +++
 *** New values for the 'completion-auto-help' user option.
 There are two new values to control the way the "*Completions*" buffer
@@ -1096,6 +1090,12 @@ to complete.  The value 'visual' is like 'always', but only updates
 the completions if they are already visible.  The default value 't'
 always hides the completion buffer after some completion is made.
 
++++
+*** New user option 'completions-sort'.
+This option controls the sorting of the completion candidates in
+the "*Completions*" buffer.  Available styles are no sorting,
+alphabetical (the default), or a custom sort function.
+
 +++
 *** New user option 'completions-max-height'.
 This option limits the height of the "*Completions*" buffer.
index 05a0855a964352146e503ad6e1f789547e535991..99c951b24b8c084c39803557e3f470a3031e2a83 100644 (file)
@@ -9502,10 +9502,10 @@ Go to the window from which completion was requested."
       (if (get-buffer-window buf)
          (select-window (get-buffer-window buf))))))
 
-(defcustom completion-wrap-movement t
+(defcustom completion-auto-wrap t
   "Non-nil means to wrap around when selecting completion options.
-This affects the commands `next-completion' and
-`previous-completion'."
+This affects the commands `next-completion' and `previous-completion'.
+When `completion-auto-select' is t, it wraps through the minibuffer."
   :type 'boolean
   :version "29.1"
   :group 'completion)
@@ -9549,7 +9549,7 @@ the completions is popped up and down."
 With prefix argument N, move back N items (negative N means move
 forward).
 
-Also see the `completion-wrap-movement' variable."
+Also see the `completion-auto-wrap' variable."
   (interactive "p")
   (next-completion (- n)))
 
@@ -9558,7 +9558,7 @@ Also see the `completion-wrap-movement' variable."
 With prefix argument N, move N items (negative N means move
 backward).
 
-Also see the `completion-wrap-movement' variable."
+Also see the `completion-auto-wrap' variable."
   (interactive "p")
   (let ((tabcommand (member (this-command-keys) '("\t" [backtab])))
         pos)
@@ -9574,7 +9574,7 @@ Also see the `completion-wrap-movement' variable."
             (goto-char pos)
           ;; If at the last completion option, wrap or skip
           ;; to the minibuffer, if requested.
-          (when completion-wrap-movement
+          (when completion-auto-wrap
             (if (and (eq completion-auto-select t) tabcommand
                      (minibufferp completion-reference-buffer))
                 (throw 'bound nil)
@@ -9598,7 +9598,7 @@ Also see the `completion-wrap-movement' variable."
                             (point) 'mouse-face nil (point-min)))))
           ;; If at the first completion option, wrap or skip
           ;; to the minibuffer, if requested.
-          (when completion-wrap-movement
+          (when completion-auto-wrap
             (if (and (eq completion-auto-select t) tabcommand
                      (minibufferp completion-reference-buffer))
                 (progn
index 56db00a124fb93a29d8f507f8901093289c882f8..ec93c8f42a5e6a1832578a122daad554aa0f8475 100644 (file)
       (should (eq (current-buffer) (get-buffer "*Completions*"))))))
 
 (ert-deftest completion-auto-wrap-test ()
-  (let ((completion-wrap-movement nil))
+  (let ((completion-auto-wrap nil))
     (completing-read-with-minibuffer-setup
         '("aa" "ab" "ac")
       (insert "a")
       (should (equal "ac" (get-text-property (point) 'completion--string)))
       (previous-completion 5)
       (should (equal "aa" (get-text-property (point) 'completion--string)))))
-  (let ((completion-wrap-movement t))
+  (let ((completion-auto-wrap t))
     (completing-read-with-minibuffer-setup
         '("aa" "ab" "ac")
       (insert "a")
       (switch-to-completions)
       (should (equal 'highlight (get-text-property (point) 'mouse-face)))
       (should (equal "aa" (get-text-property (point) 'completion--string)))
-      (let ((completion-wrap-movement t))
+      (let ((completion-auto-wrap t))
         (next-completion 3))
       (should (equal 'highlight (get-text-property (point) 'mouse-face)))
       (should (equal "aa" (get-text-property (point) 'completion--string)))
-      (let ((completion-wrap-movement nil))
+      (let ((completion-auto-wrap nil))
         (next-completion 3))
       (should (equal 'highlight (get-text-property (point) 'mouse-face)))
       (should (equal "ac" (get-text-property (point) 'completion--string)))