From 1e64768fb7a8421f9c280d9efe3c8a4d3e52d43a Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Fri, 19 Aug 2016 21:31:57 -0300 Subject: [PATCH] core: rename dotspacemacs-download-packages Rename dotspacemacs-download-packages to dotspacemacs-install-packages to better reflect the changes in the previous commit. Also change the value 'used to 'used-only (note that 'used is still supported for backward compatibility). --- core/core-configuration-layer.el | 5 +++-- core/core-dotspacemacs.el | 21 ++++++++++----------- core/templates/.spacemacs.template | 16 ++++++++-------- doc/FAQ.org | 2 +- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/core/core-configuration-layer.el b/core/core-configuration-layer.el index 1d11b2829..c1c949929 100644 --- a/core/core-configuration-layer.el +++ b/core/core-configuration-layer.el @@ -387,7 +387,7 @@ If NO-INSTALL is non nil then install steps are skipped." (let ((pkg (configuration-layer/get-package x))) (not (oref pkg :lazy-install))))) ;; also install all other packages if requested - (when (eq 'all dotspacemacs-download-packages) + (when (eq 'all dotspacemacs-install-packages) (let (all-other-packages) (dolist (layer (configuration-layer/get-layers-list)) (let ((configuration-layer--declared-layers-usedp nil) @@ -402,7 +402,8 @@ If NO-INSTALL is non nil then install steps are skipped." (configuration-layer//get-distant-packages all-other-packages nil)))))) (configuration-layer//install-packages packages) - (when (and (eq 'used dotspacemacs-download-packages) + (when (and (or (eq 'used dotspacemacs-install-packages) + (eq 'used-only dotspacemacs-install-packages)) (not configuration-layer-force-distribution) (not configuration-layer-exclude-all-layers)) (configuration-layer/delete-orphan-packages packages)))) diff --git a/core/core-dotspacemacs.el b/core/core-dotspacemacs.el index 5a26ae99b..6d949fb46 100644 --- a/core/core-dotspacemacs.el +++ b/core/core-dotspacemacs.el @@ -72,17 +72,16 @@ versions, set this to `emacs-version'.") "List of additional paths where to look for configuration layers. Paths must have a trailing slash (ie. `~/.mycontribs/')") -(defvar dotspacemacs-download-packages 'used - "Defines the behaviour of Spacemacs when downloading packages. -Possible values are `used', `used-but-keep-unused' and `all'. `used' will -download only explicitly used packages and remove any unused packages as well as -their dependencies. `used-but-keep-unused' will download only the used packages -but won't delete them if they become unused. `all' will download all the -packages regardless if they are used or not and packages won't be deleted by -Spacemacs.") +(defvar dotspacemacs-install-packages 'used-only + "Defines the behaviour of Spacemacs when installing packages. +Possible values are `used-only', `used-but-keep-unused' and `all'. `used-only' +installs only explicitly used packages and uninstall any unused packages as well +as their unused dependencies. `used-but-keep-unused' installs only the used +packages but won't uninstall them if they become unused. `all' installs *all* +packages supported by Spacemacs and never uninstall them.") (defvar dotspacemacs-enable-lazy-installation 'unused - " Lazy installation of layers (i.e. layers are installed only when a file + "Lazy installation of layers (i.e. layers are installed only when a file with a supported type is opened). Possible values are `all', `unused' and `nil'. `unused' will lazy install only unused layers (i.e. layers not listed in variable `dotspacemacs-configuration-layers'), `all' will lazy install any layer @@ -549,7 +548,7 @@ error recovery." (defadvice dotspacemacs/layers (after error-recover-preserve-packages activate) (progn - (setq-default dotspacemacs-download-packages 'used-but-keep-unused) + (setq-default dotspacemacs-install-packages 'used-but-keep-unused) (ad-disable-advice 'dotspacemacs/layers 'after 'error-recover-preserve-packages) (ad-activate 'dotspacemacs/layers))) @@ -583,7 +582,7 @@ error recovery." ;; protect global values of these variables (let (dotspacemacs-configuration-layer-path dotspacemacs-configuration-layers dotspacemacs-additional-packages dotspacemacs-excluded-packages - dotspacemacs-download-packages + dotspacemacs-install-packages (passed-tests 0) (total-tests 0)) (load dotspacemacs-filepath) (dotspacemacs/layers) diff --git a/core/templates/.spacemacs.template b/core/templates/.spacemacs.template index bf865b34a..3ebc679ff 100644 --- a/core/templates/.spacemacs.template +++ b/core/templates/.spacemacs.template @@ -59,14 +59,14 @@ values." dotspacemacs-frozen-packages '() ;; A list of packages that will not be installed and loaded. dotspacemacs-excluded-packages '() - ;; Defines the behaviour of Spacemacs when downloading packages. - ;; Possible values are `used', `used-but-keep-unused' and `all'. `used' will - ;; download only explicitly used packages and remove any unused packages as - ;; well as their dependencies. `used-but-keep-unused' will download only the - ;; used packages but won't delete them if they become unused. `all' will - ;; download all the packages regardless if they are used or not and packages - ;; won't be deleted by Spacemacs. (default is `used') - dotspacemacs-download-packages 'used)) + ;; Defines the behaviour of Spacemacs when installing packages. + ;; Possible values are `used-only', `used-but-keep-unused' and `all'. + ;; `used-only' installs only explicitly used packages and uninstall any + ;; unused packages as well as their unused dependencies. + ;; `used-but-keep-unused' installs only the used packages but won't uninstall + ;; them if they become unused. `all' installs *all* packages supported by + ;; Spacemacs and never uninstall them. (default is `used-only') + dotspacemacs-install-packages 'used-only)) (defun dotspacemacs/init () "Initialization function. diff --git a/doc/FAQ.org b/doc/FAQ.org index c51857f48..2dfebbfa6 100644 --- a/doc/FAQ.org +++ b/doc/FAQ.org @@ -66,7 +66,7 @@ To install packages that does not belong to any Spacemacs layers, you can: - use the variable =dotspacemacs-additonal-packages=. - or create a configuration layer configuring the package and add this layer to =dotspacemacs-configuration-layers= -- or set the variable =dotspacemacs-download-packages= to =used-but-keep-unused= +- or set the variable =dotspacemacs-install-packages= to =used-but-keep-unused= which will prevent Spacemacs from removing the packages you installed manually.