diff options
author | João Távora <joaotavora@gmail.com> | 2020-03-07 13:10:07 +0000 |
---|---|---|
committer | João Távora <joaotavora@gmail.com> | 2020-03-07 13:59:50 +0000 |
commit | fc47e3ad99170649de5f318ab9c6aa06cd353af1 (patch) | |
tree | 6bdeb37325f3554786ea03ca0f88def9c7131277 /lisp | |
parent | e734961d4cb8f67ab677b97b9bb70c5e2e2cfb6d (diff) | |
download | emacs-fc47e3ad99170649de5f318ab9c6aa06cd353af1.tar.gz |
Let fido-mode users force a minibuffer-exit
* lisp/icomplete.el (icomplete-fido-exit):
Add FORCE arg. Rewrite docstring. (bug#38992)
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/icomplete.el | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/icomplete.el b/lisp/icomplete.el index 0a655d1e9e9..66bc731f67f 100644 --- a/lisp/icomplete.el +++ b/lisp/icomplete.el @@ -284,10 +284,14 @@ require user confirmation." (t (icomplete-force-complete-and-exit))))) -(defun icomplete-fido-exit () - "Exit minibuffer properly honoring the REQUIRE-MATCH argument." - (interactive) - (if minibuffer--require-match +(defun icomplete-fido-exit (force) + "Attempt to exit minibuffer immediately with current input. +Unless FORCE is non-nil (interactively with a prefix argument), +honour a non-nil REQUIRE-MATCH argument to `completing-read' by +trying to complete as much as possible and disallowing the exit +if that doesn't produce a completion match." + (interactive "P") + (if (and (not force) minibuffer--require-match) (minibuffer-complete-and-exit) (exit-minibuffer))) |