summary refs log tree commit diff stats
path: root/lisp/+setup.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/+setup.el')
-rw-r--r--lisp/+setup.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/+setup.el b/lisp/+setup.el index fbd9d61..6c8e31e 100644 --- a/lisp/+setup.el +++ b/lisp/+setup.el
@@ -24,6 +24,10 @@
24(require 'setup) 24(require 'setup)
25(require 'straight) 25(require 'straight)
26 26
27(defun +setup-warn (message &rest args)
28 "Warn the user that something bad happened in `setup'."
29 (display-warning 'setup (format message args)))
30
27(setup-define :face 31(setup-define :face
28 (lambda (face spec) 32 (lambda (face spec)
29 `(custom-set-faces '(,face ,spec 'now "Customized by `setup'."))) 33 `(custom-set-faces '(,face ,spec 'now "Customized by `setup'.")))
@@ -48,6 +52,7 @@
48(setup-define :straight 52(setup-define :straight
49 (lambda (recipe) 53 (lambda (recipe)
50 `(unless (ignore-errors (straight-use-package ',recipe) t) 54 `(unless (ignore-errors (straight-use-package ',recipe) t)
55 (+setup-warn ":straight error: %S" ',recipe)
51 ,(setup-quit))) 56 ,(setup-quit)))
52 :documentation 57 :documentation
53 "Install RECIPE with `straight-use-package'. 58 "Install RECIPE with `straight-use-package'.
@@ -62,8 +67,11 @@ first RECIPE's package."
62 67
63(setup-define :straight-when 68(setup-define :straight-when
64 (lambda (recipe condition) 69 (lambda (recipe condition)
65 `(unless (and ,condition 70 `(if ,condition
66 (ignore-errors (straight-use-package ',recipe) t)) 71 (unless (ignore-errors (straight-use-package ',recipe) t)
72 (+setup-warn ":straight error: %S" ',recipe)
73 ,(setup-quit))
74 (message "Setup: :straight-when returned nil %S" ',recipe)
67 ,(setup-quit))) 75 ,(setup-quit)))
68 :documentation 76 :documentation
69 "Install RECIPE with `straight-use-package' when CONDITION is met. 77 "Install RECIPE with `straight-use-package' when CONDITION is met.