diff options
| -rw-r--r-- | lisp/minibuffer.el | 8 |
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 |