aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2023-11-02 09:56:55 +0200
committerEli Zaretskii2023-11-02 09:56:55 +0200
commitcb92eb404d73feca21666d2de1dd54b41fe34c53 (patch)
tree645a7dc8b412189ce364f00d9d6d9d2af45c3c56
parentdbcb4cedd0a78b7ea8447c84c3da104edc2d4b14 (diff)
downloademacs-cb92eb404d73feca21666d2de1dd54b41fe34c53.tar.gz
emacs-cb92eb404d73feca21666d2de1dd54b41fe34c53.zip
; Improve documentation of recent changes
* etc/NEWS: * lisp/simple.el (completion-auto-wrap, completion-auto-select) (first-completion, last-completion, previous-completion) (next-completion, previous-line-completion) (next-line-completion): Doc fixes. (Bug#59486)
-rw-r--r--etc/NEWS6
-rw-r--r--lisp/simple.el24
2 files changed, 14 insertions, 16 deletions
diff --git a/etc/NEWS b/etc/NEWS
index c865c6b8891..00df004fd70 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1010,9 +1010,9 @@ A major mode based on the tree-sitter library for editing Lua files.
1010** Minibuffer and Completions 1010** Minibuffer and Completions
1011 1011
1012*** New commands 'previous-line-completion' and 'next-line-completion'. 1012*** New commands 'previous-line-completion' and 'next-line-completion'.
1013Bound to '<up>' and '<down>' respectively, they navigate the *Completions* 1013Bound to '<UP>' and '<DOWN>' arrow keys, respectively, they navigate
1014buffer vertically, wrapping at the top/bottom when 'completion-auto-wrap' 1014the *Completions* buffer vertically by lines, wrapping at the
1015is non-nil. 1015top/bottom when 'completion-auto-wrap' is non-nil.
1016 1016
1017+++ 1017+++
1018*** New global minor mode 'minibuffer-regexp-mode'. 1018*** New global minor mode 'minibuffer-regexp-mode'.
diff --git a/lisp/simple.el b/lisp/simple.el
index fd8f08bcb3d..30208debc2a 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -9883,7 +9883,7 @@ Go to the window from which completion was requested."
9883 (select-window (get-buffer-window buf)))))) 9883 (select-window (get-buffer-window buf))))))
9884 9884
9885(defcustom completion-auto-wrap t 9885(defcustom completion-auto-wrap t
9886 "Non-nil means to wrap around when selecting completion options. 9886 "Non-nil means to wrap around when selecting completion candidates.
9887This affects the commands `next-completion', `previous-completion', 9887This affects the commands `next-completion', `previous-completion',
9888`next-line-completion' and `previous-line-completion'. 9888`next-line-completion' and `previous-line-completion'.
9889When `completion-auto-select' is t, it wraps through the minibuffer 9889When `completion-auto-select' is t, it wraps through the minibuffer
@@ -9893,12 +9893,12 @@ for the commands bound to the TAB key."
9893 :group 'completion) 9893 :group 'completion)
9894 9894
9895(defcustom completion-auto-select nil 9895(defcustom completion-auto-select nil
9896 "Non-nil means to automatically select the *Completions* buffer. 9896 "If non-nil, automatically select the window showing the *Completions* buffer.
9897When the value is t, pressing TAB will switch to the completion list 9897When the value is t, pressing TAB will switch to the completion list
9898buffer when Emacs pops up a window showing that buffer. 9898buffer when Emacs pops up a window showing that buffer.
9899If the value is `second-tab', then the first TAB will pop up the 9899If the value is `second-tab', then the first TAB will pop up the
9900window showing the completions list buffer, and the next TAB will 9900window showing the completions list buffer, and the next TAB will
9901switch to that window. 9901select that window.
9902See `completion-auto-help' for controlling when the window showing 9902See `completion-auto-help' for controlling when the window showing
9903the completions is popped up and down." 9903the completions is popped up and down."
9904 :type '(choice (const :tag "Don't auto-select completions window" nil) 9904 :type '(choice (const :tag "Don't auto-select completions window" nil)
@@ -9909,7 +9909,7 @@ the completions is popped up and down."
9909 :group 'completion) 9909 :group 'completion)
9910 9910
9911(defun first-completion () 9911(defun first-completion ()
9912 "Move to the first item in the completion list." 9912 "Move to the first item in the completions buffer."
9913 (interactive) 9913 (interactive)
9914 (goto-char (point-min)) 9914 (goto-char (point-min))
9915 (if (get-text-property (point) 'mouse-face) 9915 (if (get-text-property (point) 'mouse-face)
@@ -9921,7 +9921,7 @@ the completions is popped up and down."
9921 (goto-char pos)))) 9921 (goto-char pos))))
9922 9922
9923(defun last-completion () 9923(defun last-completion ()
9924 "Move to the last item in the completion list." 9924 "Move to the last item in the completions buffer."
9925 (interactive) 9925 (interactive)
9926 (goto-char (previous-single-property-change 9926 (goto-char (previous-single-property-change
9927 (point-max) 'mouse-face nil (point-min))) 9927 (point-max) 'mouse-face nil (point-min)))
@@ -9931,7 +9931,7 @@ the completions is popped up and down."
9931 (goto-char pos)))) 9931 (goto-char pos))))
9932 9932
9933(defun previous-completion (n) 9933(defun previous-completion (n)
9934 "Move to the previous item in the completion list. 9934 "Move to the previous item in the completions buffer.
9935With prefix argument N, move back N items (negative N means move 9935With prefix argument N, move back N items (negative N means move
9936forward). 9936forward).
9937 9937
@@ -9940,7 +9940,7 @@ Also see the `completion-auto-wrap' variable."
9940 (next-completion (- n))) 9940 (next-completion (- n)))
9941 9941
9942(defun next-completion (n) 9942(defun next-completion (n)
9943 "Move to the next item in the completion list. 9943 "Move to the next item in the completions buffer.
9944With prefix argument N, move N items (negative N means move 9944With prefix argument N, move N items (negative N means move
9945backward). 9945backward).
9946 9946
@@ -10004,18 +10004,16 @@ Also see the `completion-auto-wrap' variable."
10004 (switch-to-minibuffer)))) 10004 (switch-to-minibuffer))))
10005 10005
10006(defun previous-line-completion (&optional n) 10006(defun previous-line-completion (&optional n)
10007 "Move to the item on the previous line in the completion list. 10007 "Move to completion candidate on the previous line in the completions buffer.
10008With prefix argument N, move back N items line-wise (negative N 10008With prefix argument N, move back N lines (negative N means move forward).
10009means move forward).
10010 10009
10011Also see the `completion-auto-wrap' variable." 10010Also see the `completion-auto-wrap' variable."
10012 (interactive "p") 10011 (interactive "p")
10013 (next-line-completion (- n))) 10012 (next-line-completion (- n)))
10014 10013
10015(defun next-line-completion (&optional n) 10014(defun next-line-completion (&optional n)
10016 "Move to the item on the next line in the completion list. 10015 "Move to completion candidate on the next line in the completions buffer.
10017With prefix argument N, move N items line-wise (negative N 10016With prefix argument N, move N lines forward (negative N means move backward).
10018means move backward).
10019 10017
10020Also see the `completion-auto-wrap' variable." 10018Also see the `completion-auto-wrap' variable."
10021 (interactive "p") 10019 (interactive "p")