Add doom-protected-packages for excluding packages from autoremoval

This commit is contained in:
Henrik Lissner 2017-04-11 08:43:26 -04:00
parent e3a33f6a9e
commit 0c23ff43a4
3 changed files with 10 additions and 1 deletions

View file

@ -108,7 +108,8 @@ Used by `doom/packages-autoremove'."
(doom-initialize-packages t)
(let ((package-selected-packages
(append (mapcar 'car doom-packages) doom-core-packages)))
(package--removable-packages)))
(cl-set-difference (package--removable-packages)
doom-protected-packages)))
;;;###autoload
(defun doom-get-missing-packages ()

View file

@ -3,6 +3,11 @@
(defconst IS-MAC (eq system-type 'darwin))
(defconst IS-LINUX (eq system-type 'gnu/linux))
;; In case this config is shared across multiple computers (like mine are),
;; let's protect these from autoremoval.
(push 'exec-path-from-shell doom-protected-packages)
(push 'osx-clipboard doom-protected-packages)
;; clipboard
(setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING)
;; Use a shared clipboard

View file

@ -54,6 +54,9 @@ package's name as a symbol, and whose CDR is the plist supplied to its
"A list of packages that must be installed (and will be auto-installed if
missing) and shouldn't be deleted.")
(defvar doom-protected-packages nil
"A list of packages that shouldn't be deleted by `doom/packages-autoremove'.")
(defvar doom-init-time nil
"The time it took, in seconds, for DOOM Emacs to initialize.")