From f73f57bd8d13c8196154f124724512f3569324fe Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Tue, 30 May 2000 21:26:59 +0000 Subject: [PATCH] (Fread_file_name) [HAVE_NTGUI]: Use file dialog. (Fread_file_name) [HAVE_NTGUI, USE_MOTIF]: Do not attempt to expand a nil default_filename. --- src/fileio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index 47bc651a021..9711cad2feb 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -5662,7 +5662,7 @@ DIR defaults to current buffer's directory default.") GCPRO2 (insdef, default_filename); -#ifdef USE_MOTIF +#if defined (USE_MOTIF) || defined (HAVE_NTGUI) if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event)) && use_dialog_box && have_menus_p ()) @@ -5675,7 +5675,8 @@ DIR defaults to current buffer's directory default.") default_filename = file; dir = Ffile_name_directory (dir); } - default_filename = Fexpand_file_name (default_filename, dir); + if (!NILP(default_filename)) + default_filename = Fexpand_file_name (default_filename, dir); val = Fx_file_dialog (prompt, dir, default_filename, mustmatch); add_to_history = 1; } -- 2.39.5