mirror of
https://github.com/correl/melpa.git
synced 2024-12-22 19:17:27 +00:00
parent
a535ed7f93
commit
05f660e639
1 changed files with 19 additions and 13 deletions
|
@ -644,19 +644,25 @@ of the same-named package which is to be kept."
|
|||
The result is a list of (SOURCE . DEST), where SOURCE is a source
|
||||
file path and DEST is the relative path to which it should be copied."
|
||||
(let ((default-directory dir)
|
||||
(prefix (if subdir
|
||||
(format "%s/" subdir)
|
||||
"")))
|
||||
(cl-mapcan
|
||||
(lambda (entry)
|
||||
(if (consp entry)
|
||||
(pb/expand-file-specs dir
|
||||
(cdr entry)
|
||||
(concat prefix (car entry)))
|
||||
(mapcar (lambda (f)
|
||||
(cons f (concat prefix (file-name-nondirectory f))))
|
||||
(file-expand-wildcards entry))))
|
||||
specs)))
|
||||
(prefix (if subdir (format "%s/" subdir) ""))
|
||||
(lst))
|
||||
(dolist (entry specs lst)
|
||||
(setq lst
|
||||
(if (consp entry)
|
||||
(if (eq :exclude (car entry))
|
||||
(cl-nset-difference lst
|
||||
(pb/expand-file-specs dir (cdr entry))
|
||||
:key 'car
|
||||
:test 'equal)
|
||||
(nconc lst
|
||||
(pb/expand-file-specs dir
|
||||
(cdr entry)
|
||||
(concat prefix (car entry)))))
|
||||
(nconc
|
||||
lst (mapcar (lambda (f)
|
||||
(cons f (concat prefix (file-name-nondirectory f))))
|
||||
(file-expand-wildcards entry))))))))
|
||||
|
||||
|
||||
(defun pb/expand-config-file-list (dir config)
|
||||
"In DIR, expand the :files for CONFIG using 'pb/expand-file-specs."
|
||||
|
|
Loading…
Reference in a new issue