Commit 07a0bda3 authored by Richard M. Stallman's avatar Richard M. Stallman

(Fload): Call Fsubstitute_in_file_name after trying handler.

parent 58cabff0
...@@ -361,13 +361,17 @@ Return t if file exists.") ...@@ -361,13 +361,17 @@ Return t if file exists.")
#endif /* DOS_NT */ #endif /* DOS_NT */
CHECK_STRING (str, 0); CHECK_STRING (str, 0);
str = Fsubstitute_in_file_name (str);
/* If file name is magic, call the handler. */ /* If file name is magic, call the handler. */
handler = Ffind_file_name_handler (str, Qload); handler = Ffind_file_name_handler (str, Qload);
if (!NILP (handler)) if (!NILP (handler))
return call5 (handler, Qload, str, noerror, nomessage, nosuffix); return call5 (handler, Qload, str, noerror, nomessage, nosuffix);
/* Do this after the handler to avoid
the need to gcpro noerror, nomessage and nosuffix.
(Below here, we care only whether they are nil or not.) */
str = Fsubstitute_in_file_name (str);
/* Avoid weird lossage with null string as arg, /* Avoid weird lossage with null string as arg,
since it would try to load a directory as a Lisp file */ since it would try to load a directory as a Lisp file */
if (XSTRING (str)->size > 0) if (XSTRING (str)->size > 0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment