summaryrefslogtreecommitdiff
path: root/src/lread.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-11-18 16:43:04 +0000
committerRichard M. Stallman <rms@gnu.org>1994-11-18 16:43:04 +0000
commit89fbd6ad4c4a85035aea1d69f131623d031ac593 (patch)
treea137321711b2a19e1c91fae9a26d3e21dfb280c3 /src/lread.c
parent2346f8998cf0427636f431e0d3bd41ad4e370e79 (diff)
downloademacs-89fbd6ad4c4a85035aea1d69f131623d031ac593.tar.gz
(Fload): Call Fsubstitute_in_file_name after trying handler.
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lread.c b/src/lread.c
index c08e5fc8c1a..a753eb91868 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -361,13 +361,17 @@ Return t if file exists.")
#endif /* DOS_NT */
CHECK_STRING (str, 0);
- str = Fsubstitute_in_file_name (str);
/* If file name is magic, call the handler. */
handler = Ffind_file_name_handler (str, Qload);
if (!NILP (handler))
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,
since it would try to load a directory as a Lisp file */
if (XSTRING (str)->size > 0)