aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Távora2019-01-23 16:17:03 +0000
committerJoão Távora2019-01-23 16:31:08 +0000
commit210e592e55ade154c8d58bd467711fb69368f6cb (patch)
treeab21826e090a838a7a75667362064294af941209
parentd9779c377dabcbc3a002069084d72191ce059496 (diff)
downloademacs-210e592e55ade154c8d58bd467711fb69368f6cb.tar.gz
emacs-210e592e55ade154c8d58bd467711fb69368f6cb.zip
Avoid cycling in minibuffer-force-complete-and-exit (bug#34116)
* lisp/minibuffer.el (minibuffer-force-complete-and-exit): Check completion-cycling before minibuffer-force-complete.
-rw-r--r--lisp/minibuffer.el8
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 5760a2e49de..99cb66926bb 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1257,7 +1257,13 @@ scroll the window of possible completions."
1257(defun minibuffer-force-complete-and-exit () 1257(defun minibuffer-force-complete-and-exit ()
1258 "Complete the minibuffer with first of the matches and exit." 1258 "Complete the minibuffer with first of the matches and exit."
1259 (interactive) 1259 (interactive)
1260 (minibuffer-force-complete) 1260 ;; If `completion-cycling' is t, then surely a
1261 ;; `minibuffer-force-complete' has already executed. This is not
1262 ;; just for speed: the extra rotation caused by the second
1263 ;; unnecessary call would mess up the final result value
1264 ;; (bug#34116).
1265 (unless completion-cycling
1266 (minibuffer-force-complete))
1261 (completion--complete-and-exit 1267 (completion--complete-and-exit
1262 (minibuffer-prompt-end) (point-max) #'exit-minibuffer 1268 (minibuffer-prompt-end) (point-max) #'exit-minibuffer
1263 ;; If the previous completion completed to an element which fails 1269 ;; If the previous completion completed to an element which fails