diff options
| author | João Távora | 2019-12-25 17:57:20 +0000 |
|---|---|---|
| committer | João Távora | 2019-12-31 13:31:45 +0000 |
| commit | f2a349ba8d08ab5c3a491661acecd5600d9fb41b (patch) | |
| tree | fc5ba28499d6e499759c8c97d441095a432251ad | |
| parent | 9b1053ba272762f2e2220b806cbd30c61ff6436a (diff) | |
| download | emacs-f2a349ba8d08ab5c3a491661acecd5600d9fb41b.tar.gz emacs-f2a349ba8d08ab5c3a491661acecd5600d9fb41b.zip | |
Don't force completion recalculation in icomplete-fido-ret
Besides the adverse effect of delaying completions, it tripped up the
useful logic of icomplete-force-complete-and-exit in the case where a
default was available, but no completions calculated yet.
* lisp/icomplete.el (icomplete-fido-ret): Don't force calculation
of completions.
(cherry picked from commit 13778aa5be7bf028893672d84c2a291f491d8216)
| -rw-r--r-- | lisp/icomplete.el | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 5126c035de1..3b3cabb890e 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el | |||
| @@ -276,15 +276,13 @@ require user confirmation." | |||
| 276 | (interactive) | 276 | (interactive) |
| 277 | (let* ((dir (and (eq (icomplete--category) 'file) | 277 | (let* ((dir (and (eq (icomplete--category) 'file) |
| 278 | (file-name-directory (icomplete--field-string)))) | 278 | (file-name-directory (icomplete--field-string)))) |
| 279 | (current (car (completion-all-sorted-completions))) | 279 | (current (car completion-all-sorted-completions)) |
| 280 | (probe (and dir current | 280 | (probe (and dir current |
| 281 | (expand-file-name (directory-file-name current) dir)))) | 281 | (expand-file-name (directory-file-name current) dir)))) |
| 282 | (cond ((and probe (file-directory-p probe) (not (string= current "./"))) | 282 | (cond ((and probe (file-directory-p probe) (not (string= current "./"))) |
| 283 | (icomplete-force-complete)) | 283 | (icomplete-force-complete)) |
| 284 | (current | ||
| 285 | (icomplete-force-complete-and-exit)) | ||
| 286 | (t | 284 | (t |
| 287 | (exit-minibuffer))))) | 285 | (icomplete-force-complete-and-exit))))) |
| 288 | 286 | ||
| 289 | (defun icomplete-fido-backward-updir () | 287 | (defun icomplete-fido-backward-updir () |
| 290 | "Delete char before or go up directory, like `ido-mode'." | 288 | "Delete char before or go up directory, like `ido-mode'." |