DEFUN ("ns-read-file-name", Fns_read_file_name, Sns_read_file_name, 1, 4, 0,
doc: /* Use a graphical panel to read a file name, using prompt PROMPT.
Optional arg DIR, if non-nil, supplies a default directory.
-Optional arg ISLOAD, if non-nil, means read a file name for saving.
+Optional arg MUSTMATCH, if non-nil, means the returned file or
+directory must exist.
Optional arg INIT, if non-nil, provides a default file name to use. */)
- (prompt, dir, isLoad, init)
- Lisp_Object prompt, dir, isLoad, init;
+ (prompt, dir, mustmatch, init)
+ Lisp_Object prompt, dir, mustmatch, init;
{
static id fileDelegate = nil;
int ret;
if ([dirS characterAtIndex: 0] == '~')
dirS = [dirS stringByExpandingTildeInPath];
- panel = NILP (isLoad) ?
+ panel = NILP (mustmatch) ?
(id)[EmacsSavePanel savePanel] : (id)[EmacsOpenPanel openPanel];
[panel setTitle: promptS];
panelOK = 0;
BLOCK_INPUT;
- if (NILP (isLoad))
+ if (NILP (mustmatch))
{
ret = [panel runModalForDirectory: dirS file: initS];
}