]> code.delx.au - gnu-emacs/commitdiff
Fixes: debbugs:12197
authorAndreas Schwab <schwab@linux-m68k.org>
Tue, 14 Aug 2012 08:37:41 +0000 (10:37 +0200)
committerAndreas Schwab <schwab@linux-m68k.org>
Tue, 14 Aug 2012 08:37:41 +0000 (10:37 +0200)
* emacs-lisp/bytecomp.el (byte-recompile-file): When LOAD is
non-nil always load the compiled file if it exists.

lisp/ChangeLog
lisp/emacs-lisp/bytecomp.el

index 285e69d9db1d351310b9daeb1401849c540f1978..7232fa9f62bd2386a50ed7a6ea06a953d23e0b83 100644 (file)
@@ -1,3 +1,8 @@
+2012-08-14  Andreas Schwab  <schwab@linux-m68k.org>
+
+       * emacs-lisp/bytecomp.el (byte-recompile-file): When LOAD is
+       non-nil always load the compiled file if it exists.  (Bug#12197)
+
 2012-08-14  Chong Yidong  <cyd@gnu.org>
 
        * hi-lock.el (hi-lock-mode): Do not unilaterally enable font lock.
index e5df8dd112c2990f5fd3ad4488a5c33736ccac16..1e0ab336f41a1e48a51ccbdb1e2e6005331ecaf9 100644 (file)
@@ -1632,7 +1632,7 @@ not* compile FILENAME. If ARG is 0, that means
 compile the file even if it has never been compiled before.
 A nonzero ARG means ask the user.
 
-If LOAD is set, `load' the file after compiling.
+If LOAD is non-nil, `load' the file after compiling.
 
 The value returned is the value returned by `byte-compile-file',
 or 'no-byte-compile if the file did not need recompilation."
@@ -1665,7 +1665,8 @@ or 'no-byte-compile if the file did not need recompilation."
           (if (and noninteractive (not byte-compile-verbose))
               (message "Compiling %s..." filename))
           (byte-compile-file filename load))
-      (when load (load filename))
+      (when load
+       (load (if (file-exists-p dest) dest filename)))
       'no-byte-compile)))
 
 ;;;###autoload