changeset 10734:634120aac320

(Fexpand_file_name): Copy default-directory before looking for a handler on the directory arg.
author Richard M. Stallman <rms@gnu.org>
date Tue, 14 Feb 1995 00:13:20 +0000
parents d08b63758c1a
children ad3b83f7dadb
files src/fileio.c
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c	Mon Feb 13 18:10:28 1995 +0000
+++ b/src/fileio.c	Tue Feb 14 00:13:20 1995 +0000
@@ -745,6 +745,12 @@
   handler = Ffind_file_name_handler (name, Qexpand_file_name);
   if (!NILP (handler))
     return call3 (handler, Qexpand_file_name, name, defalt);
+
+  /* Use the buffer's default-directory if DEFALT is omitted.  */
+  if (NILP (defalt))
+    defalt = current_buffer->directory;
+  CHECK_STRING (defalt, 1);
+
   if (!NILP (defalt))
     {
       handler = Ffind_file_name_handler (defalt, Qexpand_file_name);
@@ -752,11 +758,6 @@
 	return call3 (handler, Qexpand_file_name, name, defalt);
     }
 
-  /* Use the buffer's default-directory if DEFALT is omitted.  */
-  if (NILP (defalt))
-    defalt = current_buffer->directory;
-  CHECK_STRING (defalt, 1);
-
   o = XSTRING (defalt)->data;
 
   /* Make sure DEFALT is properly expanded.