Update selected packages when deleting last package
* lisp/emacs-lisp/package.el (package--save-selected-packages): Allow setting 'package-selected-packages' to a nil value. (bug#65475)
This commit is contained in:
parent
1d46bca1c9
commit
610105ee81
1 changed files with 4 additions and 1 deletions
|
@ -1982,7 +1982,10 @@ Used to populate `package-selected-packages'."
|
|||
|
||||
(defun package--save-selected-packages (&optional value)
|
||||
"Set and save `package-selected-packages' to VALUE."
|
||||
(when value
|
||||
(when (or value after-init-time)
|
||||
;; It is valid to set it to nil, for example when the last package
|
||||
;; is uninstalled. But it shouldn't be done at init time, to
|
||||
;; avoid overwriting configurations that haven't yet been loaded.
|
||||
(setq package-selected-packages value))
|
||||
(if after-init-time
|
||||
(customize-save-variable 'package-selected-packages package-selected-packages)
|
||||
|
|
Loading…
Add table
Reference in a new issue