[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/setup 4a4b1c5 4/4: Merge :if-require into :require
From: |
Stefan Monnier |
Subject: |
[elpa] externals/setup 4a4b1c5 4/4: Merge :if-require into :require |
Date: |
Wed, 2 Jun 2021 18:28:50 -0400 (EDT) |
branch: externals/setup
commit 4a4b1c5334d63f28567fa51715a36881cf405d06
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Merge :if-require into :require
---
setup.el | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/setup.el b/setup.el
index eeb337b..f046d49 100644
--- a/setup.el
+++ b/setup.el
@@ -269,8 +269,9 @@ the first PACKAGE."
(setup-define :require
(lambda (feature)
- `(require ',feature))
- :documentation "Eagerly require FEATURE.
+ `(unless (require ',feature nil t)
+ (throw 'setup-exit nil)))
+ :documentation "Try to require FEATURE, or stop evaluating body.
This macro can be used as HEAD, and it will replace itself with
the first FEATURE."
:repeatable t
@@ -498,16 +499,6 @@ the first PACKAGE."
:repeatable t
:shorthand #'cadr)
-(setup-define :if-require
- (lambda (feature)
- `(unless (require ',feature nil t)
- (throw 'setup-exit nil)))
- :documentation "If FEATURE cannot be required, stop evaluating the body.
-This macro can be used as HEAD, and it will replace itself with
-the first PACKAGE."
- :repeatable t
- :shorthand #'cadr)
-
(setup-define :if-host
(lambda (hostname)
`(unless (string= (system-name) ,hostname)