diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2019-01-23 12:30:54 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2019-01-23 12:30:54 -0500 |
commit | 42732e2f8d963f0ce97caf6172d146b0119f5e06 (patch) | |
tree | 777db42bbe0dc3878fe0a9230fcd2aeb750f66b2 /lisp/icomplete.el | |
parent | b3dfcf3e9f217919903f3469323fcd1386a16893 (diff) | |
download | emacs-42732e2f8d963f0ce97caf6172d146b0119f5e06.tar.gz |
Rework last commit to icomplete and minibuffer.el.
Rather than let minibuffer-force-complete set up cycling and then undoing it,
better tell it directly not to setup cycling. Also be a bit more careful
to remove the transient map.
Additionally to bug#34077 and bug#34116, this also relates to bug#25644.
* lisp/minibuffer.el (completion--flush-all-sorted-completions):
Also take down the transient cycling map if applicable.
(minibuffer-force-complete): New arg dont-cycle.
Set completion-cycling to the actual function that takes down the
transient map rather than just t.
(minibuffer-force-complete-and-exit):
* lisp/icomplete.el (icomplete-force-complete): Use new dont-cycle arg.
Diffstat (limited to 'lisp/icomplete.el')
-rw-r--r-- | lisp/icomplete.el | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 128fe6688bf..10fd3a698c5 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -165,17 +165,8 @@ the default otherwise." (defun icomplete-force-complete () "Complete the icomplete minibuffer." (interactive) - (let ((retval (minibuffer-force-complete))) - ;; FIXME: What's this, you ask? To deal with a cycling corner - ;; case, `minibuffer-force-complete' will transiently replace the - ;; keybinding that this command was called with, but at least - ;; returns a function which we can call to disable that, since - ;; we're not at all interested in cycling here (bug#34077). - (when (and completion-cycling (functionp retval)) (funcall retval))) - ;; Again, since we're not interested in cycling, we don't want - ;; prospects to be recalculted from a cache of rotated completions. - (setq completion-cycling nil) - (setq completion-all-sorted-completions nil)) + ;; We're not at all interested in cycling here (bug#34077). + (minibuffer-force-complete nil nil 'dont-cycle)) (defun icomplete-forward-completions () "Step forward completions by one entry. |