Subject: bug#66187: read-file-name unexpected behavior when MUSTMATCH is a function

From: Stefan Monnier <[email-masked]>
Date: Sun, 17 Dec 2023 19:24:51 -0500

> Here's another potential solution.  While the attached patch seems to
> work, I'm not sure that minibuffer-completion-confirm should be checked
> in completion--do-completion instead of completion--complete-and-exit.

It's definitely better to check it in `completion--complete-and-exit`
(which is about exiting and thus related to whether the content is
acceptable) than in `completion--do-completion` (which is just about
completion).

The patch looks OK, thanks.  We could make it call `completion-function`
instead of saying "no match" (after all, it has "complete" in its name),
but it comes with its own set of problems.

        Stefan