about summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/+setup.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/lisp/+setup.el b/lisp/+setup.el index bc57078..7c658b6 100644 --- a/lisp/+setup.el +++ b/lisp/+setup.el
@@ -135,5 +135,20 @@ The arguments REST are handled as by `:bind'."
135 :debug '(sexp &rest form sexp) 135 :debug '(sexp &rest form sexp)
136 :indent 1) 136 :indent 1)
137 137
138(setup-define :require
139 (lambda (&rest features)
140 (require 'cl-lib)
141 (if features
142 `(progn ,@(cl-loop for feature in features collect
143 `(unless (require ',feature nil t)
144 ,(setup-quit))))
145 `(unless (require ',(setup-get 'feature) nil t)
146 ,(setup-quit))))
147 :documentation "Try to require FEATURE, or stop evaluating body.
148This macro can be used as NAME, and it will replace itself with
149the first FEATURE."
150 :repeatable nil
151 :shorthand #'cadr)
152
138(provide '+setup) 153(provide '+setup)
139;;; +setup.el ends here 154;;; +setup.el ends here