2000-03-12 Gerd Moellmann <gerd@gnu.org>
+ * fileio.c (Fread_file_name): Handle case that DIR contains a
+ file name.
+
* window.c (Fsave_window_excursion): Doc fix.
* xfns.c (x_defined_color): Rewritten to use
&& use_dialog_box
&& have_menus_p ())
{
+ /* If DIR contains a file name, split it. */
+ Lisp_Object file;
+ file = Ffile_name_nondirectory (dir);
+ if (XSTRING (file)->size && NILP (default_filename))
+ {
+ default_filename = file;
+ dir = Ffile_name_directory (dir);
+ }
+ default_filename = Fexpand_file_name (default_filename, dir);
val = Fx_file_dialog (prompt, dir, default_filename, mustmatch);
add_to_history = 1;
}