summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-09-02 01:21:55 +0000
committerRichard M. Stallman <rms@gnu.org>1995-09-02 01:21:55 +0000
commite64ce28ba1077a90cb93956e77d775ac41c618b0 (patch)
tree943a7087368e1783717b867296c30e150cfb5b7b /src
parent249f3eb7ba743ae23f822badb2432f96bbeb8da5 (diff)
downloademacs-e64ce28ba1077a90cb93956e77d775ac41c618b0.tar.gz
(Fmake_symbolic_link, Fadd_name_to_file):
Look for handler for the new name as well as for the target.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/fileio.c b/src/fileio.c
index d58a15041c9..cd2e9bbfe0f 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2124,6 +2124,13 @@ This is what happens in interactive use with M-x.")
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 @@ This happens for interactive use with M-x.")
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",