changeset 12985:3adacdaa1d3f

(Fmake_symbolic_link, Fadd_name_to_file): Look for handler for the new name as well as for the target.
author Richard M. Stallman <rms@gnu.org>
date Sat, 02 Sep 1995 01:21:55 +0000
parents 7c38c6da4aae
children 180f04639e71
files src/fileio.c
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/fileio.c	Sat Sep 02 01:19:53 1995 +0000
+++ b/src/fileio.c	Sat Sep 02 01:21:55 1995 +0000
@@ -2124,6 +2124,13 @@
     RETURN_UNGCPRO (call4 (handler, Qadd_name_to_file, filename,
 			   newname, ok_if_already_exists));
 
+  /* If the new name has special constructs in it,
+     call the corresponding file handler.  */
+  handler = Ffind_file_name_handler (newname, Qadd_name_to_file);
+  if (!NILP (handler))
+    RETURN_UNGCPRO (call4 (handler, Qadd_name_to_file, filename,
+			   newname, ok_if_already_exists));
+
   if (NILP (ok_if_already_exists)
       || INTEGERP (ok_if_already_exists))
     barf_or_query_if_file_exists (newname, "make it a new name",
@@ -2184,6 +2191,13 @@
     RETURN_UNGCPRO (call4 (handler, Qmake_symbolic_link, filename,
 			   linkname, ok_if_already_exists));
 
+  /* If the new link name has special constructs in it,
+     call the corresponding file handler.  */
+  handler = Ffind_file_name_handler (linkname, Qmake_symbolic_link);
+  if (!NILP (handler))
+    RETURN_UNGCPRO (call4 (handler, Qmake_symbolic_link, filename,
+			   linkname, ok_if_already_exists));
+
   if (NILP (ok_if_already_exists)
       || INTEGERP (ok_if_already_exists))
     barf_or_query_if_file_exists (linkname, "make it a link",