]> git.eshelyaron.com Git - emacs.git/commitdiff
emacs-lisp/package.el (package-reinstall): Don't change selected status.
authorThierry Volpiatto <thierry.volpiatto@gmail.com>
Mon, 2 Feb 2015 20:35:29 +0000 (21:35 +0100)
committerArtur Malabarba <bruce.connor.am@gmail.com>
Tue, 3 Feb 2015 11:18:46 +0000 (11:18 +0000)
lisp/ChangeLog
lisp/emacs-lisp/package.el

index 80ee86ac95896e11b69500d7f149977060a9188b..713262665585d7752c2799f33a6be48397e96c67 100644 (file)
@@ -1,3 +1,8 @@
+2015-02-03  Thierry Volpiatto  <thierry.volpiatto@gmail.com>
+
+       * emacs-lisp/package.el (package-reinstall): Don't change package's selected status.
+       (package-delete): New NOSAVE argument.
+
 2015-02-03  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp-sh.el (tramp-histfile-override): Fix docstring.
index 16271060626d598268e8c75dc796c1f30c41081d..869b2f03bd9f08c44a042d96cfa47cb02d508474 100644 (file)
@@ -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))))))