[Fix] dotspacemacs/test-dotfile
complains error on new custom vars
After new custom `dotspacemacs-*` variables being introduced in `core/core-dotspacemacs.el`, if one has an old `.spacemacs` without these variables set, `SPC f e R` will complain error messages like ``` Variable: "dotspacemacs-emacs-dumper-dump-file" has value: "nil" that doesn't match its type: "string"... ``` even if these variables have already had initial value. This is because `dotspacemacs||let-init-test` macro only locally declares these variables without setting them with their initial value. This pull request fix this issue by expanding (dotspacemacs/get-variable-list) into `'((var1 value1) (var2 value2) ...)` list instead of `(var1 var2 ...)`.
This commit is contained in:
parent
e54affd5a7
commit
5bd1603b65
|
@ -1106,7 +1106,11 @@ error recovery."
|
|||
(defmacro dotspacemacs||let-init-test (&rest body)
|
||||
"Macro to protect dotspacemacs variables"
|
||||
`(let ((fpath dotspacemacs-filepath)
|
||||
,@(dotspacemacs/get-variable-list)
|
||||
,@(mapcar (lambda (symbol)
|
||||
`(,symbol ,(let ((v (symbol-value symbol)))
|
||||
(if (or (symbolp v) (listp v))
|
||||
`',v v))))
|
||||
(dotspacemacs/get-variable-list))
|
||||
(passed-tests 0) (total-tests 0))
|
||||
(setq dotspacemacs-filepath fpath)
|
||||
(load dotspacemacs-filepath)
|
||||
|
|
Loading…
Reference in a new issue