From a921e5fcd40c367e27ef0491ab067df1eab50892 Mon Sep 17 00:00:00 2001 From: Thierry Volpiatto Date: Tue, 23 Dec 2014 07:03:27 +0100 Subject: [PATCH] Use always the args 0 and force for byte-recompile-directory. * async-bytecomp.el (async-byte-recompile-directory): Remove confusing args used in byte-recompile-directory and add docstring. (package--compile): Remove old args of async-byte-recompile-directory. --- async-bytecomp.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/async-bytecomp.el b/async-bytecomp.el index 8920c22d3..eaf3ad5ae 100644 --- a/async-bytecomp.el +++ b/async-bytecomp.el @@ -44,7 +44,9 @@ (defvar async-byte-compile-log-file "~/.emacs.d/async-bytecomp.log") -(defun async-byte-recompile-directory (directory &optional arg force quiet) +(defun async-byte-recompile-directory (directory &optional quiet) + "Compile all *.el files in DIRECTORY asynchronously. +All *.elc files are systematically deleted before proceeding." (cl-loop with dir = (directory-files directory t "\\.elc\\'") unless dir return nil for f in dir @@ -81,7 +83,7 @@ (let ((default-directory (file-name-as-directory ,directory)) error-data) (add-to-list 'load-path default-directory) - (byte-recompile-directory ,directory ,arg ,force) + (byte-recompile-directory ,directory 0 t) (when (get-buffer byte-compile-log-buffer) (setq error-data (with-current-buffer byte-compile-log-buffer (buffer-substring-no-properties (point-min) (point-max)))) @@ -90,7 +92,7 @@ (erase-buffer) (insert error-data)))))) call-back) - (message "Started compiling asynchronously directory %s..." directory))) + (message "Started compiling asynchronously directory %s" directory))) (defadvice package--compile (around byte-compile-async activate) ;; FIXME this seems redundant and unneeded, the only thing it @@ -100,7 +102,7 @@ ;; compilation in package-activate (force arg). (package-activate-1 pkg-desc) (load "async-bytecomp") - (async-byte-recompile-directory (package-desc-dir pkg-desc) 0 t t)) + (async-byte-recompile-directory (package-desc-dir pkg-desc) t)) (provide 'async-bytecomp) -- 2.39.2