GNU bug report logs -
#5303
23.1.91; Cannot load .emacs-history from savehist.el
Previous Next
Full log
Message #146 received at 5303-done <at> debbugs.gnu.org (full text, mbox):
> From: Chong Yidong <cyd <at> stupidchicken.com>
> Cc: 5303 <at> debbugs.gnu.org, michael.albinus <at> gmx.de,
> Stefan Monnier <monnier <at> IRO.UMontreal.CA>,
> Richard Stallman <rms <at> gnu.org>
> Date: Thu, 21 Jan 2010 15:41:06 -0500
>
> Chong Yidong <cyd <at> stupidchicken.com> writes:
>
> >> . Was safe_to_load_p intended to return non-zero value for invalid
> >> file descriptors such as -2?
> >
> > I think that is a bug.
>
> Does it fix the bug if safe_to_load_p returns 0 when the call to
> emacs_read on line 895 returns a value <= 0?
It does, but I prefer not to call safe_to_load_p at all in that case.
I've installed a slightly different fix, see below.
(There's another, possibly similar bug: load-file fails for
C:/the-file.el.gz because jka-compr signals a wrong type argument
error. But that problem existed with the original Fload as well. I
will file a separate bug and see what I can find there.)
2010-01-22 Eli Zaretskii <eliz <at> gnu.org>
* lread.c (Fload): Don't treat files without .elc extension as
byte-compiled if they are ``magic'', i.e. `openp' returned -2 for
them. (bug#5303)
=== modified file 'src/lread.c'
--- src/lread.c 2010-01-13 08:35:10 +0000
+++ src/lread.c 2010-01-22 08:35:48 +0000
@@ -1155,7 +1155,7 @@ Return t if the file exists and loads su
if (!bcmp (SDATA (found) + SBYTES (found) - 4,
".elc", 4)
- || (version = safe_to_load_p (fd)) > 0)
+ || (fd >= 0 && (version = safe_to_load_p (fd)) > 0))
/* Load .elc files directly, but not when they are
remote and have no handler! */
{
This bug report was last modified 15 years and 121 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.