Commit 102a21d6 authored by Artur Malabarba's avatar Artur Malabarba

emacs-lisp/package.el (package-reinstall): Accept package-desc objects.

parent 5687ac9f
......@@ -7,6 +7,7 @@
selected. When given a package-desc object which is already
installed, the package is not downloaded again, but it is marked
as selected (if it wasn't already).
(package-reinstall): Accept package-desc objects.
2015-02-03 Artur Malabarba <>
......@@ -1265,12 +1265,16 @@ to install it but still mark it as selected."
(defun package-reinstall (pkg)
"Reinstall package PKG."
"Reinstall package PKG.
PKG shoul be either a symbol, the package name, or a package-desc
(interactive (list (intern (completing-read
"Reinstall package: "
(mapcar #'symbol-name
(mapcar #'car package-alist))))))
(package-delete (cadr (assq pkg package-alist)) 'force 'nosave)
(if (package-desc-p pkg) pkg (cadr (assq pkg package-alist)))
'force 'nosave)
(package-install pkg))
(defun package-strip-rcs-id (str)
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