Mercurial > emacs
diff src/fileio.c @ 55741:6433313b236b
(Fread_file_name): Expand DIR if not absolute.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 22 May 2004 22:17:17 +0000 |
parents | 626bc3834cd3 |
children | 56b3ebd82889 50b9a96c837c 4c90ffeb71c5 |
line wrap: on
line diff
--- a/src/fileio.c Sat May 22 22:15:37 2004 +0000 +++ b/src/fileio.c Sat May 22 22:17:17 2004 +0000 @@ -6198,10 +6198,13 @@ if (NILP (dir)) dir = current_buffer->directory; + if (NILP (Ffile_name_absolute_p (dir))) + dir = Fexpand_file_name (dir, Qnil); if (NILP (default_filename)) - default_filename = !NILP (initial) - ? Fexpand_file_name (initial, dir) - : current_buffer->filename; + default_filename + = (!NILP (initial) + ? Fexpand_file_name (initial, dir) + : current_buffer->filename); /* If dir starts with user's homedir, change that to ~. */ homedir = (char *) egetenv ("HOME");