mirror of
https://github.com/dimitri/el-get.git
synced 2024-09-29 04:58:53 +08:00
Simplify the patch to a single function since there's no known use for
the more general internal version.
This commit is contained in:
parent
3dc440aa77
commit
53a135ad84
12
el-get.el
12
el-get.el
|
@ -902,17 +902,9 @@ whether or not el-get is listed in the 'packages argument list.
|
|||
|
||||
This is useful, for example, when we want to remove all packages not
|
||||
explicitly declared in the user-init-file (.emacs)."
|
||||
(el-get--remove-all-but (add-to-list 'packages 'el-get)))
|
||||
|
||||
(defun el-get--remove-all-but (packages)
|
||||
"Removes all installed packages which are not in the argument
|
||||
list 'packages or dependencies thereof.
|
||||
|
||||
N.B. Dangerous since it will remove el-get itself unless you
|
||||
explicitly list el-get in the 'packages argument. Normal users
|
||||
should probably be using el-get-cleanup instead."
|
||||
(let* ((packages-to-keep (el-get-dependencies
|
||||
(mapcar 'el-get-as-symbol packages)))
|
||||
(mapcar 'el-get-as-symbol
|
||||
(add-to-list 'packages 'el-get))))
|
||||
(packages-to-remove (set-difference
|
||||
(mapcar 'el-get-as-symbol
|
||||
(el-get-list-package-names-with-status
|
||||
|
|
Loading…
Reference in New Issue
Block a user