[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/setup bee533a 1/4: Add :if-host keyword
From: |
Stefan Monnier |
Subject: |
[elpa] externals/setup bee533a 1/4: Add :if-host keyword |
Date: |
Wed, 2 Jun 2021 18:28:49 -0400 (EDT) |
branch: externals/setup
commit bee533a4d791eeba9b9cf675cd3d664a12e097ce
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Add :if-host keyword
---
setup.el | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/setup.el b/setup.el
index b496ba1..8840d03 100644
--- a/setup.el
+++ b/setup.el
@@ -498,6 +498,12 @@ the first PACKAGE."
:repeatable t
:shorthand #'cadr)
+(setup-define :if-host
+ (lambda (hostname)
+ `(unless (string= (system-name) ,hostname)
+ (throw 'setup-exit nil)))
+ :documentation "If HOSTNAME is not the current hostname, stop evaluating
form.")
+
(setup-define :only-if
(lambda (condition)
`(unless ,condition