From ed8b7391feb70501c35af77fc54e48dd2d4f8e4a Mon Sep 17 00:00:00 2001 From: "Tom Breton (Tehom)" Date: Fri, 12 Nov 2010 20:17:22 -0500 Subject: [PATCH] Made compile-p and force-recompile-p control variables --- elinstall.el | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/elinstall.el b/elinstall.el index e65a823..bb69278 100644 --- a/elinstall.el +++ b/elinstall.el @@ -833,14 +833,14 @@ DIR should be an absolute path." ;;add-to-load-path-p - Controls whether to add to load-path. ;;recurse-dirs-p - Whether to recurse into subdirectories. (defconst elinstall-find-actions-control-vars - '(add-to-load-path-p recurse-dirs-p) + '(add-to-load-path-p recurse-dirs-p compile-p force-recompile-p) "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)) + load-path-element def-file compile-p force-recompile-p)) (let ((full-path (expand-file-name filename dir))) @@ -872,29 +872,25 @@ Special variables are as noted in \"List of special variables\"." (ignore-errors (with-current-buffer buf (not no-update-autoloads)))) - (compile-p + (do-compile-p (and (featurep 'byte-compile) (string-match emacs-lisp-file-regexp filename) (ignore-errors (with-current-buffer buf (not no-byte-compile))) - (let* - ((dest (byte-compile-dest-file full-path)) - ;;$$PUNT - currently, we wouldn't have - ;;gotten here if we weren't intending to do - ;;everything so set force variables accordingly. - (recompile-p nil) - (compile-new t)) + (let + ((dest (byte-compile-dest-file full-path))) (if (file-exists-p dest) ;; File was already compiled. - (or recompile-p (file-newer-than-file-p full-path dest)) - (or compile-new + (or force-recompile-p + (file-newer-than-file-p full-path dest)) + (or compile-p (y-or-n-p (concat "Compile " filename "? ")))))))) (prog1 (list - (if compile-p + (if do-compile-p `(byte-compile ,full-path) nil) (if autoloads-p @@ -1109,10 +1105,12 @@ Recurse just if RECURSE-DIRS-P" ((load-path-element load-path-element) (def-file def-file) (add-to-load-path-p t) - (recurse-dirs-p t)) + (recurse-dirs-p t) + (force-recompile-p nil) + (compile-p t)) (declare (special load-path-element def-file add-to-load-path-p - recurse-dirs-p)) + recurse-dirs-p force-recompile-p compile-p)) (elinstall-find-actions-by-spec-x spec dir))) -- 2.11.4.GIT