emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r99390: Fix bug #5303 in `load' on MS


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r99390: Fix bug #5303 in `load' on MS-Windows, whereby load-file would fail
Date: Fri, 22 Jan 2010 10:44:50 +0200
User-agent: Bazaar (2.0.2)

------------------------------------------------------------
revno: 99390
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Fri 2010-01-22 10:44:50 +0200
message:
  Fix bug #5303 in `load' on MS-Windows, whereby load-file would fail
  for files like C:/the-file.el in root directory of any drive.
  
   lread.c (Fload): Don't treat files without .elc extension as
   byte-compiled if they are ``magic'', i.e. `openp' returned -2 for
   them.
modified:
  src/ChangeLog
  src/lread.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-01-20 02:33:52 +0000
+++ b/src/ChangeLog     2010-01-22 08:44:50 +0000
@@ -1,3 +1,9 @@
+2010-01-22  Eli Zaretskii  <address@hidden>
+
+       * 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)
+
 2010-01-20  Kenichi Handa  <address@hidden>
 
        * coding.c (consume_chars): If ! multibyte and the encoder is ccl,

=== modified file 'src/lread.c'
--- a/src/lread.c       2010-01-13 08:35:10 +0000
+++ b/src/lread.c       2010-01-22 08:44:50 +0000
@@ -1155,7 +1155,7 @@
 
   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!  */
     {


reply via email to

[Prev in Thread] Current Thread [Next in Thread]