summaryrefslogtreecommitdiff
path: root/lisp/minibuffer.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2022-04-10 10:37:55 +0300
committerJuri Linkov <juri@linkov.net>2022-04-10 10:37:55 +0300
commit735b45191041778824460807ee5bf4d1cebd3421 (patch)
tree14bb7680579f48fc0d53ae5fa5be314a7d943f17 /lisp/minibuffer.el
parentf29fd102d7531619a98acbf0f3e012fb0f6b233f (diff)
downloademacs-735b45191041778824460807ee5bf4d1cebd3421.tar.gz
emacs-735b45191041778824460807ee5bf4d1cebd3421.tar.bz2
emacs-735b45191041778824460807ee5bf4d1cebd3421.zip
Allow non-interactive uses of minibuffer-next-completion
* lisp/minibuffer.el (minibuffer-previous-completion) (minibuffer-next-completion): Use 1 for n by default.
Diffstat (limited to 'lisp/minibuffer.el')
-rw-r--r--lisp/minibuffer.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index c79c5a7a5d6..68b167ccc78 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -4362,7 +4362,7 @@ and execute the forms."
(with-minibuffer-completions-window
(when completions-highlight-face
(setq-local cursor-face-highlight-nonselected-window t))
- (previous-completion n)))
+ (previous-completion (or n 1))))
(defun minibuffer-next-completion (&optional n)
"Run `next-completion' from the minibuffer in its completions window."
@@ -4370,7 +4370,7 @@ and execute the forms."
(with-minibuffer-completions-window
(when completions-highlight-face
(setq-local cursor-face-highlight-nonselected-window t))
- (next-completion n)))
+ (next-completion (or n 1))))
(defun minibuffer-choose-previous-completion (&optional n)
"Run `previous-completion' from the minibuffer in its completions window.