+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.
"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)
(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.
(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))))))