Refactor def-setting!/set! implementation

The `doom-settings` variable has been removed. Setting checks are done
with fboundp now, which is simpler.
This commit is contained in:
Henrik Lissner 2018-06-02 16:23:50 +02:00
parent 385cb476ba
commit 428f1e1d07
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
3 changed files with 25 additions and 27 deletions

View file

@ -107,11 +107,10 @@
(def-test! set
(eval-and-compile
(let (doom-settings)
(def-setting! :-test-setting (x) `(setq result ,x))
(should (assq :-test-setting doom-settings))
(def-setting! :-test-setting (x) `(setq result ,x))
(should (fboundp 'doom--set:-test-setting))
(let ((inhibit-message t)
result)
(set! :-test-setting t)
(should result)
(set! :non-existant-setting (error "This shouldn't trigger"))))))
(set! :non-existant-setting (error "This shouldn't trigger")))))