From 20df7570070ab07d2dcb770cea58630f26e857c4 Mon Sep 17 00:00:00 2001 From: Dave Love Date: Thu, 18 Jul 2002 16:30:48 +0000 Subject: [PATCH] (Fload) : Don't leak fd. : Refuse to load. --- src/ChangeLog | 5 +++++ src/lread.c | 13 +++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index d4aaeb3d548..6b777088a12 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2002-07-18 Dave Love + + * lread.c (Fload) : Don't leak fd. + : Refuse to load. + 2002-07-17 Dave Love * fns.c: Move coding.h. diff --git a/src/lread.c b/src/lread.c index d2d55be637a..b4dc71514d9 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); } -- 2.39.5