Commit 55b6085b authored by Dimitri Fontaine's avatar Dimitri Fontaine

Fix reading all recipes to only read the first recipe file.

It appears that Emacs Lisp loop will generate its own symbols/bindings for
the collect keyword even when you try to reference an already existing
binding in an outer block, and that I didn't test that properly before.

Seeing duplicates in the el-get-xxx commands completion did annoy me and
seeing them in M-x el-get-list-packages looked too much as a bug for me to
continue ignore it.
parent 4f9abc46
......@@ -122,14 +122,18 @@ Used to avoid errors when exploring the path for recipes"
Only consider any given recipe only once even if present in
multiple dirs from `el-get-recipe-path'. The first recipe found
is the one considered."
(loop for dir in (el-get-recipe-dirs)
with packages
nconc (loop for recipe in (directory-files dir nil "^[^.].*\.\\(rcp\\|el\\)$")
for filename = (concat (file-name-as-directory dir) recipe)
for package = (file-name-sans-extension (file-name-nondirectory recipe))
unless (member package packages)
collect package into packages
and collect (ignore-errors (el-get-read-recipe-file filename)))))
(let (packages)
for dir in (el-get-recipe-dirs)
nconc (loop
for recipe in (directory-files dir nil "^[^.].*\.\\(rcp\\|el\\)$")
for filename = (concat (file-name-as-directory dir) recipe)
for pname = (file-name-sans-extension
(file-name-nondirectory recipe))
for package = (el-get-as-symbol pname)
unless (member package packages)
do (push package packages)
and collect (ignore-errors (el-get-read-recipe-file filename))))))
(defun el-get-read-all-recipes ()
"Return the list of all the recipes, formatted like `el-get-sources'.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment