From aeca34d20cab7283f36422b0b3d5ddca0f108b8b Mon Sep 17 00:00:00 2001 From: "Tom Breton (Tehom)" Date: Thu, 23 Dec 2010 22:03:29 -0500 Subject: [PATCH] Rename compile-p -> byte-compile-p --- elinstall.el | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/elinstall.el b/elinstall.el index d7abc08..2cb5e9e 100644 --- a/elinstall.el +++ b/elinstall.el @@ -910,16 +910,22 @@ 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 +;;`ask', prompt the user unless recompiling an out-of-date file. +;;force-recompile-p - 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 compile-p force-recompile-p) + '(add-to-load-path-p recurse-dirs-p byte-compile-p force-recompile-p + make-autoloads setup-preloads) "Control special variables that the find-actions tree recognizes" ) ;;;_ . elinstall-actions-for-source-file (defun elinstall-actions-for-source-file (filename dir) "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 compile-p force-recompile-p)) + load-path-element def-file byte-compile-p force-recompile-p)) (let ((full-path (expand-file-name filename dir))) @@ -953,6 +959,7 @@ Special variables are as noted in \"List of special variables\"." (not no-update-autoloads)))) (do-compile-p (and + byte-compile-p (featurep 'byte-compile) (string-match emacs-lisp-file-regexp filename) (ignore-errors @@ -960,11 +967,12 @@ Special variables are as noted in \"List of special variables\"." (not no-byte-compile))) (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 compile-p + (or byte-compile-p (y-or-n-p (concat "Compile " filename "? ")))))))) (prog1 @@ -1207,13 +1215,13 @@ Recurse just if RECURSE-DIRS-P" (add-to-load-path-p t) (recurse-dirs-p t) (force-recompile-p nil) - (compile-p t) + (byte-compile-p 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 compile-p + recurse-dirs-p force-recompile-p byte-compile-p block-in-dir block-in-subtree)) (elinstall-find-actions-by-spec-x spec dir))) @@ -1314,7 +1322,7 @@ development." (interactive "DUpdate autoloads for all elisp files from directory: ") (elinstall-x dir - `(control compile-p nil + `(control byte-compile-p nil (dir ".")))) ;;;_ . elinstall-update-directory @@ -1335,7 +1343,7 @@ development." (interactive "fUpdate autoloads for elisp file: ") (elinstall-x (file-name-directory file) - `(control compile-p nil + `(control byte-compile-p nil (file ,(file-name-nondirectory file))))) ;;;_ . elinstall-update-file -- 2.11.4.GIT