summaryrefslogtreecommitdiff
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-rw-r--r--init.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/init.el b/init.el
index fa28a21..cf2dd26 100644
--- a/init.el
+++ b/init.el
@@ -154,6 +154,19 @@
`(progn ,@form)
'(progn)))
+(require 'cl-lib)
+
+(defmacro choose-for-machine (&rest clauses)
+ "Return the `cadr' of the CLAUSE whose `car' is `(system-name)'."
+ (let* ((name-clause (cl-find-if #'(lambda (x)
+ (string= (system-name) (car x)))
+ clauses))
+ (last-clause (cl-find-if #'(lambda (x) (eq 't (car x)))
+ clauses)))
+ (cond (name-clause (cadr name-clause))
+ (last-clause (cadr last-clause))
+ (t 'nil))))
+
(load-module "core")
(load-module "jakob")
(load-module "appearance")

© 2015 - 2026 Jakob L. Kreuze