From: Thierry Volpiatto Date: Mon, 2 Feb 2015 20:35:29 +0000 (+0100) Subject: emacs-lisp/package.el (package-reinstall): Don't change selected status. X-Git-Tag: emacs-25.0.90~2008^2~136 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=88acd70e67a1096200fb18b586310a4126ea024a;p=emacs.git emacs-lisp/package.el (package-reinstall): Don't change selected status. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 80ee86ac958..71326266558 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2015-02-03 Thierry Volpiatto + + * emacs-lisp/package.el (package-reinstall): Don't change package's selected status. + (package-delete): New NOSAVE argument. + 2015-02-03 Michael Albinus * net/tramp-sh.el (tramp-histfile-override): Fix docstring. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 16271060626..869b2f03bd9 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1239,7 +1239,8 @@ to `package-selected-packages'." "Reinstall package: " (mapcar #'symbol-name (mapcar #'car package-alist)))))) - (package-delete (cadr (assq pkg package-alist)) t) + (package-delete (cadr (assq pkg package-alist)) 'force + (memq pkg package-selected-packages)) (package-install pkg)) (defun package-strip-rcs-id (str) @@ -1470,7 +1471,7 @@ with PKG-DESC entry removed." (and (memq pkg (mapcar #'car (package-desc-reqs (cadr p)))) (car p)))))) -(defun package-delete (pkg-desc &optional force) +(defun package-delete (pkg-desc &optional force nosave) "Delete package PKG-DESC. Argument PKG-DESC is a full description of package as vector. @@ -1506,7 +1507,8 @@ elsewhere." (unless (cdr pkgs) (setq package-alist (delq pkgs package-alist)))) ;; Update package-selected-packages. - (when (memq name package-selected-packages) + (when (and (memq name package-selected-packages) + (null nosave)) (customize-save-variable 'package-selected-packages (remove name package-selected-packages))) (message "Package `%s' deleted." (package-desc-full-name pkg-desc))))))