Commit b2c4997c authored by Artur Malabarba's avatar Artur Malabarba
Browse files

emacs-lisp/package.el (package-menu-mark-install): Mark dependency.

parent de840e43
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
function. Return PACKAGE-LIST sorted by dependencies. function. Return PACKAGE-LIST sorted by dependencies.
(package-menu-execute): Use it to delete packages in order. (package-menu-execute): Use it to delete packages in order.
(package--sort-deps-in-alist): New function. (package--sort-deps-in-alist): New function.
(package-menu-mark-install): Can mark dependencies.
2015-02-05 Stefan Monnier <monnier@iro.umontreal.ca> 2015-02-05 Stefan Monnier <monnier@iro.umontreal.ca>
......
...@@ -2262,7 +2262,7 @@ If optional arg BUTTON is non-nil, describe its associated package." ...@@ -2262,7 +2262,7 @@ If optional arg BUTTON is non-nil, describe its associated package."
(defun package-menu-mark-install (&optional _num) (defun package-menu-mark-install (&optional _num)
"Mark a package for installation and move to the next line." "Mark a package for installation and move to the next line."
(interactive "p") (interactive "p")
(if (member (package-menu-get-status) '("available" "new")) (if (member (package-menu-get-status) '("available" "new" "dependency"))
(tabulated-list-put-tag "I" t) (tabulated-list-put-tag "I" t)
(forward-line))) (forward-line)))
...@@ -2418,7 +2418,13 @@ Optional argument NOQUERY non-nil means do not ask the user to confirm." ...@@ -2418,7 +2418,13 @@ Optional argument NOQUERY non-nil means do not ask the user to confirm."
(mapconcat #'package-desc-full-name (mapconcat #'package-desc-full-name
install-list ", "))))) install-list ", ")))))
(mapc (lambda (p) (mapc (lambda (p)
(package-install p (null (package-installed-p p)))) ;; Mark as selected if it's the exact version of a
;; package that's already installed, or if it's not
;; installed at all. Don't mark if it's a new
;; version of an installed package.
(package-install p (or (package-installed-p p)
(not (package-installed-p
(package-desc-name p))))))
install-list))) install-list)))
;; Delete packages, prompting if necessary. ;; Delete packages, prompting if necessary.
(when delete-list (when delete-list
......
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