mirror of
https://github.com/correl/melpa.git
synced 2024-11-22 19:18:39 +00:00
Extract default :files spec to a defconst
This commit is contained in:
parent
9d78285d60
commit
b2609a0a01
1 changed files with 4 additions and 1 deletions
|
@ -75,6 +75,9 @@ function.")
|
|||
Do not use this directly. Use `package-build-archive-alist'
|
||||
function for access to this function")
|
||||
|
||||
(defconst pb/default-files-spec '("*.el" "dir" "*.info")
|
||||
"Default value for :files attribute in recipes.")
|
||||
|
||||
|
||||
(defun pb/slurp-file (file-name)
|
||||
"Return the contents of FILE-NAME as a string, or nil if no such file exists."
|
||||
|
@ -621,7 +624,7 @@ file path and DEST is the relative path to which it should be copied."
|
|||
|
||||
(defun pb/expand-config-file-list (dir config)
|
||||
"In DIR, expand the :files for CONFIG using 'pb/expand-file-specs."
|
||||
(let* ((patterns (or (plist-get config :files) '("*.el" "dir" "*.info")))
|
||||
(let* ((patterns (or (plist-get config :files) pb/default-files-spec))
|
||||
(files (pb/expand-file-specs dir patterns)))
|
||||
(or files
|
||||
(error "No matching file(s) found in %s: %s" dir patterns))))
|
||||
|
|
Loading…
Reference in a new issue