aboutsummaryrefslogtreecommitdiffstats
path: root/src/lread.c
diff options
context:
space:
mode:
authorDave Love <[email protected]>2002-07-18 16:30:48 +0000
committerDave Love <[email protected]>2002-07-18 16:30:48 +0000
commit20df7570070ab07d2dcb770cea58630f26e857c4 (patch)
tree27a7dbf7c1854b248c86c4ddd61754c7d9feff22 /src/lread.c
parent1de0ddd35bc035144868b7f8af705619918e6a89 (diff)
(Fload) <!load_dangerous_libraries>: Don't leak fd.
<version == 20>: Refuse to load.
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/lread.c b/src/lread.c
index d2d55be637..b4dc71514d 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -758,8 +758,11 @@ Return t if file exists. */)
{
safe_p = 0;
if (!load_dangerous_libraries)
- error ("File `%s' was not compiled in Emacs",
- XSTRING (found)->data);
+ {
+ emacs_close (fd);
+ error ("File `%s' was not compiled in Emacs",
+ XSTRING (found)->data);
+ }
else if (!NILP (nomessage))
message_with_string ("File `%s' not compiled in Emacs", found, 1);
}
@@ -778,9 +781,15 @@ Return t if file exists. */)
if (fd >= 0)
emacs_close (fd);
+ /* load-with-code-conversion currently fails with
+ emacs-mule non-ASCII doc strings. */
+ error ("Can't currently load Emacs 20/1-compiled files: %s",
+ XSTRING (found)->data);
+#if 0
val = call4 (intern ("load-with-code-conversion"), found, file,
NILP (noerror) ? Qnil : Qt,
NILP (nomessage) ? Qnil : Qt);
+#endif
return unbind_to (count, val);
}