From 686ee3a7759e7b67f0e511e049a2674785a31029 Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Fri, 21 Feb 2014 10:01:54 +0000 Subject: [PATCH] Print a warning when :files is redundant If a :files spec is provided and expands to the same set of files as package-build-default-files-spec, then print a warning. --- package-build.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package-build.el b/package-build.el index d34ac9b2..c62ad762 100644 --- a/package-build.el +++ b/package-build.el @@ -856,7 +856,11 @@ Returns the archive entry for the package." (when (symbolp package-name) (setq package-name (symbol-name package-name))) (let ((files (package-build-expand-file-specs source-dir file-specs))) - (cond + (unless (equal file-specs package-build-default-files-spec) + (when (equal files (package-build-expand-file-specs + source-dir package-build-default-files-spec nil t)) + (pb/message "Note: this :files spec is equivalent to the default."))) + (cond ((not version) (error "Unable to check out repository for %s" package-name)) ((= 1 (length files))