changeset 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 eba675d00657
children a5ccd5ee3c52
files src/fileio.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
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");