Mercurial > emacs
comparison src/lread.c @ 88870:4b1cc2afc2c8
(Fload) <!load_dangerous_libraries>: Don't leak fd.
<version == 20>: Refuse to load.
author | Dave Love <fx@gnu.org> |
---|---|
date | Thu, 18 Jul 2002 16:30:36 +0000 |
parents | ef046df4c6ee |
children | 300f83fb46e1 |
comparison
equal
deleted
inserted
replaced
88869:b26b42483aeb | 88870:4b1cc2afc2c8 |
---|---|
756 | 756 |
757 if (!(version = safe_to_load_p (fd))) | 757 if (!(version = safe_to_load_p (fd))) |
758 { | 758 { |
759 safe_p = 0; | 759 safe_p = 0; |
760 if (!load_dangerous_libraries) | 760 if (!load_dangerous_libraries) |
761 error ("File `%s' was not compiled in Emacs", | 761 { |
762 XSTRING (found)->data); | 762 emacs_close (fd); |
763 error ("File `%s' was not compiled in Emacs", | |
764 XSTRING (found)->data); | |
765 } | |
763 else if (!NILP (nomessage)) | 766 else if (!NILP (nomessage)) |
764 message_with_string ("File `%s' not compiled in Emacs", found, 1); | 767 message_with_string ("File `%s' not compiled in Emacs", found, 1); |
765 } | 768 } |
766 | 769 |
767 compiled = 1; | 770 compiled = 1; |
776 { | 779 { |
777 Lisp_Object val; | 780 Lisp_Object val; |
778 | 781 |
779 if (fd >= 0) | 782 if (fd >= 0) |
780 emacs_close (fd); | 783 emacs_close (fd); |
784 /* load-with-code-conversion currently fails with | |
785 emacs-mule non-ASCII doc strings. */ | |
786 error ("Can't currently load Emacs 20/1-compiled files: %s", | |
787 XSTRING (found)->data); | |
788 #if 0 | |
781 val = call4 (intern ("load-with-code-conversion"), found, file, | 789 val = call4 (intern ("load-with-code-conversion"), found, file, |
782 NILP (noerror) ? Qnil : Qt, | 790 NILP (noerror) ? Qnil : Qt, |
783 NILP (nomessage) ? Qnil : Qt); | 791 NILP (nomessage) ? Qnil : Qt); |
792 #endif | |
784 return unbind_to (count, val); | 793 return unbind_to (count, val); |
785 } | 794 } |
786 | 795 |
787 #ifdef DOS_NT | 796 #ifdef DOS_NT |
788 fmode = "rb"; | 797 fmode = "rb"; |