conao3 / leaf.el

Flexible, declarative, and modern init.el package configuration
GNU General Public License v3.0
505 stars 28 forks source link

Use just push instead of using package--save-selected-packages #517

Closed conao3 closed 2 years ago

conao3 commented 2 years ago

Description

   use just `push` instead of using `package--update-selected-packages`

   Note
   - The previous function expanded `custom-save-variable`, which
    saved custom.el sequentially, causing serious performance
    degradation in some cases.

   - Since `package-selected-packages` was introduced in Emacs-25.1,
    we will consider the case where this variable is not declared.
    If it is not declared, just `setq` it as a new variable. (leaf-safe-push)

   - Remove progn from the second `condition-case`, since
    it can accept multiple S-expressions in the error arm.

Checklist