[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/4] Use byte-recompile-file in emacs-lisp-byte-compile-and-load
From: |
Julien Danjou |
Subject: |
[PATCH 2/4] Use byte-recompile-file in emacs-lisp-byte-compile-and-load |
Date: |
Tue, 21 Sep 2010 17:26:08 +0200 |
Signed-off-by: Julien Danjou <address@hidden>
---
lisp/ChangeLog | 3 +++
lisp/emacs-lisp/lisp-mode.el | 5 +----
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 34a1dfd..175286b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
2010-09-21 Julien Danjou <address@hidden>
+ * emacs-lisp/lisp-mode.el (emacs-lisp-byte-compile-and-load): Use
+ `byte-recompile-file'.
+
* emacs-lisp/bytecomp.el (byte-recompile-file): Add this function.
(byte-recompile-directory): Use `byte-recompile-file'.
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index e4330e4..ef639d6 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -407,10 +407,7 @@ All commands in `lisp-mode-shared-map' are inherited by
this map.")
(if (and (buffer-modified-p)
(y-or-n-p (format "Save buffer %s first? " (buffer-name))))
(save-buffer))
- (let ((compiled-file-name (byte-compile-dest-file buffer-file-name)))
- (if (file-newer-than-file-p compiled-file-name buffer-file-name)
- (load-file compiled-file-name)
- (byte-compile-file buffer-file-name t))))
+ (byte-recompile-file buffer-file-name nil 0 t))
(defcustom emacs-lisp-mode-hook nil
"Hook run when entering Emacs Lisp mode."
--
1.7.1