From: João Távora Date: Sat, 7 Mar 2020 13:10:07 +0000 (+0000) Subject: Let fido-mode users force a minibuffer-exit X-Git-Tag: emacs-27.0.91~101 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fc47e3ad99170649de5f318ab9c6aa06cd353af1;p=emacs.git Let fido-mode users force a minibuffer-exit * lisp/icomplete.el (icomplete-fido-exit): Add FORCE arg. Rewrite docstring. (bug#38992) --- 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)))