(Fread_file_name): Handle case that DIR contains a
file name.
This commit is contained in:
parent
d21cf544f7
commit
9172b88ddf
2 changed files with 12 additions and 0 deletions
|
@ -1,5 +1,8 @@
|
|||
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
|
||||
|
|
|
@ -5596,6 +5596,15 @@ DIR defaults to current buffer's directory default.")
|
|||
&& 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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue