From f6e0d1e95ea71cdf20404d353511d6146d8f60bb Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Wed, 14 Jan 2015 17:12:19 +0900 Subject: [PATCH] emacs.el: Print message when EMACS_EL_DRY_RUN is set --- emacs.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/emacs.el b/emacs.el index d92c658..1b52219 100644 --- a/emacs.el +++ b/emacs.el @@ -86,11 +86,13 @@ FORCE-DOWNLOAD-P) will be ignored." (locate-library lib))) ;; If EMACS_EL_DRY_RUN is set and it is not an empty string, fetch-library ;; does not actually fetch library. -(setq fetch-library-enabled-p - (let ((dryrun (getenv "EMACS_EL_DRY_RUN"))) - (not (and dryrun - (eq 0 - (length dryrun)))))) +(let ((dryrun (getenv "EMACS_EL_DRY_RUN"))) + (when (and dryrun + (< 0 + (length dryrun))) + (setq fetch-library-enabled-p + t) + (message "EMACS_EL_DRY_RUN is set. Skip fetching libraries."))) (defun download-file (url path &optional ok-if-already-exists) "Download file from URL and output to PATH.