aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Távora2019-01-17 15:11:21 +0000
committerJoão Távora2019-01-17 15:11:36 +0000
commit7560ef7de925b56f367df168befc9b748b6237c1 (patch)
tree451fa901fb1de226567f17490409a13990e9e715
parent80cbfb61c5a562d51197d6f3068fa5f4cda432b0 (diff)
downloademacs-7560ef7de925b56f367df168befc9b748b6237c1.tar.gz
emacs-7560ef7de925b56f367df168befc9b748b6237c1.zip
Revert "Fix icomplete's cycling when filename filtering kicks in"
This reverts commit cdb082322d4209c5104bc1a98b21bf3dd75e8f17, which was a fix for bug#34070. A much better fix to be added soon.
-rw-r--r--lisp/icomplete.el17
1 files changed, 5 insertions, 12 deletions
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index 82e2728487b..8bed46cb3b3 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -162,9 +162,6 @@ the default otherwise."
162 (minibuffer-force-complete-and-exit) 162 (minibuffer-force-complete-and-exit)
163 (minibuffer-complete-and-exit))) 163 (minibuffer-complete-and-exit)))
164 164
165(defvar icomplete--filtered-completions nil
166 "If non-nil completions as filtered by `icomplete-completions'")
167
168(defun icomplete-forward-completions () 165(defun icomplete-forward-completions ()
169 "Step forward completions by one entry. 166 "Step forward completions by one entry.
170Second entry becomes the first and can be selected with 167Second entry becomes the first and can be selected with
@@ -172,8 +169,7 @@ Second entry becomes the first and can be selected with
172 (interactive) 169 (interactive)
173 (let* ((beg (icomplete--field-beg)) 170 (let* ((beg (icomplete--field-beg))
174 (end (icomplete--field-end)) 171 (end (icomplete--field-end))
175 (comps (or icomplete--filtered-completions 172 (comps (completion-all-sorted-completions beg end))
176 (completion-all-sorted-completions beg end)))
177 (last (last comps))) 173 (last (last comps)))
178 (when comps 174 (when comps
179 (setcdr last (cons (car comps) (cdr last))) 175 (setcdr last (cons (car comps) (cdr last)))
@@ -186,8 +182,7 @@ Last entry becomes the first and can be selected with
186 (interactive) 182 (interactive)
187 (let* ((beg (icomplete--field-beg)) 183 (let* ((beg (icomplete--field-beg))
188 (end (icomplete--field-end)) 184 (end (icomplete--field-end))
189 (comps (or icomplete--filtered-completions 185 (comps (completion-all-sorted-completions beg end))
190 (completion-all-sorted-completions beg end)))
191 (last-but-one (last comps 2)) 186 (last-but-one (last comps 2))
192 (last (cdr last-but-one))) 187 (last (cdr last-but-one)))
193 (when (consp last) ; At least two elements in comps 188 (when (consp last) ; At least two elements in comps
@@ -387,11 +382,9 @@ matches exist."
387 (progn ;;(debug (format "Candidates=%S field=%S" candidates name)) 382 (progn ;;(debug (format "Candidates=%S field=%S" candidates name))
388 (format " %sNo matches%s" open-bracket close-bracket)) 383 (format " %sNo matches%s" open-bracket close-bracket))
389 (if last (setcdr last nil)) 384 (if last (setcdr last nil))
390 (if (and minibuffer-completing-file-name 385 (when (and minibuffer-completing-file-name
391 icomplete-with-completion-tables) 386 icomplete-with-completion-tables)
392 (setq comps (completion-pcm--filename-try-filter comps) 387 (setq comps (completion-pcm--filename-try-filter comps)))
393 icomplete--filtered-completions comps)
394 (setq icomplete--filtered-completions nil))
395 (let* ((most-try 388 (let* ((most-try
396 (if (and base-size (> base-size 0)) 389 (if (and base-size (> base-size 0))
397 (completion-try-completion 390 (completion-try-completion