changeset 29312:8b6842c36473

(Fread_file_name) [HAVE_NTGUI]: Use file dialog. (Fread_file_name) [HAVE_NTGUI, USE_MOTIF]: Do not attempt to expand a nil default_filename.
author Jason Rumney <jasonr@gnu.org>
date Tue, 30 May 2000 21:26:59 +0000
parents ae557edf565b
children 1d74ff8abe23
files src/fileio.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c	Tue May 30 21:24:04 2000 +0000
+++ b/src/fileio.c	Tue May 30 21:26:59 2000 +0000
@@ -5662,7 +5662,7 @@
 
   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 @@
 	  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;
     }