emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: defcustom :type (file :must-match t)


From: Luc Teirlinck
Subject: Re: defcustom :type (file :must-match t)
Date: Tue, 20 Dec 2005 17:56:39 -0600 (CST)

Drew Adams wrote:

   I don't understand the customization type `(file :must-match t)'. The Elisp
   manual says only this: "The value must be a file name for an existing file,
   and you can do completion with `M-<TAB>'."

and:

   So, in what sense _must_ the file-name value be the name of an existing
   file? What am I missing?

In the sense that if Custom checks the type _in the minibuffer_ (as
opposed to in an editable field in a Custom buffer), say with
`customize-set-variable', the completion functions will prevent you
from entering a non-existent file name.  If you insist, you can enter
such a name anyway, with C-M-c (but that will usually be a bad idea).

This doc can be found in `(widget)atoms' (but I do not understand the
reference to the "tag button"; by default there seems to be no such
button):

 -- Widget: file
     Allows you to edit a file name in an editable field.  If you invoke
     the tag button, you can edit the file name in the mini-buffer with
     completion.

     Keywords:
    `:must-match'
          If this is set to non-`nil', only existing file names will be
          allowed in the minibuffer.


Sincerely,

Luc.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]