summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2012-08-14 10:37:41 +0200
committerAndreas Schwab <schwab@linux-m68k.org>2012-08-14 10:37:41 +0200
commite5b19827faaff8168889c9cf3c8f746fd67e6991 (patch)
treeb729bb50a842775952bf5c9ae0127294b90ac1b4 /lisp/emacs-lisp
parent56120d6f972c5e7830cd2df99b4c424f0c451ffd (diff)
downloademacs-e5b19827faaff8168889c9cf3c8f746fd67e6991.tar.gz
emacs-e5b19827faaff8168889c9cf3c8f746fd67e6991.tar.bz2
emacs-e5b19827faaff8168889c9cf3c8f746fd67e6991.zip
Fixes: debbugs:12197
* emacs-lisp/bytecomp.el (byte-recompile-file): When LOAD is non-nil always load the compiled file if it exists.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index e5df8dd112c..1e0ab336f41 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -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