From 41276119eae0750d4bb1e8a3ac119da48e52fb3b Mon Sep 17 00:00:00 2001 From: Ag Ibragimov Date: Sat, 27 Jun 2020 18:48:59 -0700 Subject: [PATCH] [core] Fix: removes nils from layers list Spacemacs allows to define layers declaratively like so: dotspacemacs-configuration-layers `(,(when (eq system-type 'darwin) 'osx)) The problem - in Linux that would add a nil element into the list, which then makes it unable to run dotspacemacs/sync-configuration-layers , the tests won't pass. --- CHANGELOG.develop | 2 ++ core/core-dotspacemacs.el | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.develop b/CHANGELOG.develop index 586654d12..5d21d6151 100644 --- a/CHANGELOG.develop +++ b/CHANGELOG.develop @@ -664,6 +664,8 @@ Other: - Avoid unnecessary packages installation of tern layer - Fixed terminal mode line indicator overlapping (thanks to duianto) - Fixed broken --timed-requires and --adv-timers under Emacs 27 and above (thanks to Ying Qu) + - Removed nils from =dotspacemacs-configuration-layers= when running tests + (thanks to Ag Ibragimov) - Other: - New function =configuration-layer/message= to display message in =*Messages*= buffer (thanks to Sylvain Benner) diff --git a/core/core-dotspacemacs.el b/core/core-dotspacemacs.el index 31efe646e..74d99120a 100644 --- a/core/core-dotspacemacs.el +++ b/core/core-dotspacemacs.el @@ -828,7 +828,7 @@ error recovery." "exists in filesystem" "path") (setq dotspacemacs-configuration-layers (mapcar (lambda (l) (if (listp l) (car l) l)) - dotspacemacs-configuration-layers)) + (remove nil dotspacemacs-configuration-layers))) (spacemacs//test-list 'configuration-layer/get-layer-path 'dotspacemacs-configuration-layers "can be found" "layer")