branch: externals/vertico
commit 801ad3143d26653384f4c25bad44f7c098dd704c
Author: Daniel Mendler <m...@daniel-mendler.de>
Commit: Daniel Mendler <m...@daniel-mendler.de>

    Why keep a complicated API when we can make it more complicated?
    
    Support function argument for REQUIRE-MATCH on Emacs 29. As can be seen 
here,
    the REQUIRE-MATCH function call provides equivalent functionality as the
    test-completion call. Thus this Emacs 29 addition is unnecessary. 
Admittedly it
    adds a little bit of convenience since the caller of completing-read doesn't
    have to modify the completion table.
---
 vertico.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/vertico.el b/vertico.el
index 71ec41cb3d..4dbf911e83 100644
--- a/vertico.el
+++ b/vertico.el
@@ -652,6 +652,8 @@ The function is configured by BY, BSIZE, BINDEX, BPRED and 
PRED."
   "Return t if INPUT is a valid match."
   (or (memq minibuffer--require-match '(nil confirm-after-completion))
       (equal "" input) ;; Null completion, returns default value
+      (and (functionp minibuffer--require-match) ;; Emacs 29 require-match 
function
+           (funcall minibuffer--require-match input))
       (test-completion input minibuffer-completion-table 
minibuffer-completion-predicate)
       (if (eq minibuffer--require-match 'confirm)
           (eq (ignore-errors (read-char "Confirm")) 13)

Reply via email to