From 10fa6dd5c659bed2b818fb925445cab2cbbb5325 Mon Sep 17 00:00:00 2001 From: Joseph Turner Date: Tue, 3 Oct 2023 14:40:22 -0700 Subject: [PATCH] Clarify completing-read REQUIRE-MATCH function docstring * src/minibuf.c (Fcompleting_read): Explicitly note that REQUIRE-MATCH function does not narrow the completion candidates. --- src/minibuf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/minibuf.c b/src/minibuf.c index 58adde1bf66..616be7091ee 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1999,8 +1999,11 @@ REQUIRE-MATCH can take the following values: `minibuffer-complete' right before `minibuffer-complete-and-exit' and the input is not an element of COLLECTION. - a function, which will be called with the input as the - argument. If the function returns a non-nil value, the - minibuffer is exited with that argument as the value. + argument. If the function returns a non-nil value or if + the input is a member of COLLECTION, the minibuffer is + exited with that argument as the value. If the function + returns nil and the input is not a member of COLLECTION, + then the user is not allowed to exit. - anything else behaves like t except that typing RET does not exit if it does non-null completion. -- 2.41.0