Subject: bug#25678: 25.1; defcustom type `(file :must-match t)' seems not to work

From: [email-masked]
Date: Fri, 17 Feb 2017 18:57:56 -0500

Drew Adams <[email-masked]> writes:

> (defcustom foo-file ""
>   ""
>   :type '(file :must-match t) :group 'convenience)
>
> M-x customize-option foo-file
>
> I don't see anything that prevents you from using a file name that
> corresponds to no existing file.  I don't see that completion (`M-TAB') 
> enforces it to name an existing file.  And I don't see that simply 
> inserting a bad file name is prevented, nor is setting the option to a
> bad file name or saving it prevented.
>
> What effect does (file :must-match t) actually have, if any?

It looks like `widget-file-prompt-value' consults it, but I can't tell
when this function is called.