From 92627a8f18a9372f3b1f82804c805d634733892b Mon Sep 17 00:00:00 2001 From: "Tom Breton (Tehom)" Date: Thu, 23 Dec 2010 22:26:21 -0500 Subject: [PATCH] Renamed byte-compile-p,force-recompile-p -> byte-compile,force-recompile --- elinstall.el | 44 ++++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/elinstall.el b/elinstall.el index 2cb5e9e..1bae28e 100644 --- a/elinstall.el +++ b/elinstall.el @@ -910,14 +910,14 @@ Filenames are relative." ;;They may include wildcards. They apply wrt any directory in the ;;tree. Specifically, in the spec tree, which may differ from the ;;file subtree. -;;byte-compile-p - whether to byte-compile at all, t by default. If it's +;;byte-compile - whether to byte-compile at all, t by default. If it's ;;`ask', prompt the user unless recompiling an out-of-date file. -;;force-recompile-p - boolean whether to compile even up to date +;;force-recompile - boolean whether to compile even up to date ;;files, nil by default. ;;make-autoloads - boolean whether to make autoloads, t by default. ;;setup-preloads - boolean whether to set up preloads, t by default. (defconst elinstall-find-actions-control-vars - '(add-to-load-path-p recurse-dirs-p byte-compile-p force-recompile-p + '(add-to-load-path-p recurse-dirs-p byte-compile force-recompile make-autoloads setup-preloads) "Control special variables that the find-actions tree recognizes" ) ;;;_ . elinstall-actions-for-source-file @@ -925,7 +925,7 @@ Filenames are relative." "Return a list of actions to do for FILENAME in DIR. Special variables are as noted in \"List of special variables\"." (declare (special - load-path-element def-file byte-compile-p force-recompile-p)) + load-path-element def-file byte-compile force-recompile)) (let ((full-path (expand-file-name filename dir))) @@ -959,22 +959,24 @@ Special variables are as noted in \"List of special variables\"." (not no-update-autoloads)))) (do-compile-p (and - byte-compile-p + byte-compile (featurep 'byte-compile) (string-match emacs-lisp-file-regexp filename) (ignore-errors (with-current-buffer buf (not no-byte-compile))) - (let + (let* ((dest (byte-compile-dest-file full-path))) - ;;$$CHANGE MY LOGIC - (if (file-exists-p dest) - ;; File was already compiled. - (or force-recompile-p - (file-newer-than-file-p full-path dest)) - (or byte-compile-p - (y-or-n-p (concat "Compile " filename "? ")))))))) - + (cond + ((file-exists-p dest) + (or force-recompile + (file-newer-than-file-p full-path dest))) + ((memq byte-compile '(t update)) + t) + ((eq byte-compile 'ask) + (y-or-n-p + (concat "Compile " filename "? ")))))))) + (prog1 (list (if do-compile-p @@ -1214,14 +1216,16 @@ Recurse just if RECURSE-DIRS-P" (def-file-time (elinstall-file-mod-time def-file)) (add-to-load-path-p t) (recurse-dirs-p t) - (force-recompile-p nil) - (byte-compile-p t) - (block-in-dir '()) + (force-recompile nil) + (byte-compile t) + (make-autoloads t) + (setup-preloads t) + (block-in-dir '()) (block-in-subtree '(".git" "RCS" "CVS" "SVN" "^tests\.el"))) (declare (special load-path-element def-file add-to-load-path-p - recurse-dirs-p force-recompile-p byte-compile-p + recurse-dirs-p force-recompile byte-compile block-in-dir block-in-subtree)) (elinstall-find-actions-by-spec-x spec dir))) @@ -1322,7 +1326,7 @@ development." (interactive "DUpdate autoloads for all elisp files from directory: ") (elinstall-x dir - `(control byte-compile-p nil + `(control byte-compile nil (dir ".")))) ;;;_ . elinstall-update-directory @@ -1343,7 +1347,7 @@ development." (interactive "fUpdate autoloads for elisp file: ") (elinstall-x (file-name-directory file) - `(control byte-compile-p nil + `(control byte-compile nil (file ,(file-name-nondirectory file))))) ;;;_ . elinstall-update-file -- 2.11.4.GIT