From 66ecd92944d7d169c0760402f7b8fd0a2f255958 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 5 Oct 2021 14:22:18 -0500 Subject: Change `:straight-if` to `:straight-when` `:straight-when` is a more accurate representation of what it's doing. I also found out that I could change its indentation, which I did. --- lisp/acdw-setup.el | 3 ++- lisp/acdw.el | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'lisp') diff --git a/lisp/acdw-setup.el b/lisp/acdw-setup.el index eb4d12b..33ab835 100644 --- a/lisp/acdw-setup.el +++ b/lisp/acdw-setup.el @@ -72,7 +72,7 @@ first RECIPE's package." (car recipe) recipe)))) -(setup-define :straight-if +(setup-define :straight-when (lambda (recipe condition) `(if ,condition (straight-use-package ',recipe) @@ -83,6 +83,7 @@ If CONDITION is false, stop evaluating the body. This macro can be used as HEAD, and will replace itself with the RECIPE's package. This macro is not repeatable." :repeatable nil + :indent 1 :shorthand (lambda (sexp) (let ((recipe (cadr sexp))) (if (consp recipe) (car recipe) recipe)))) diff --git a/lisp/acdw.el b/lisp/acdw.el index e013fbc..969b6c8 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el @@ -352,7 +352,7 @@ In short, DO NOT USE THIS FUNCTION!!!" (cond ;; Straight forms require some weirdness ((and s1-straight s2-straight) - (let* ((r (rx ":straight" (? "-if") (* space) (? "("))) + (let* ((r (rx ":straight" (? "-when") (* space) (? "("))) (s1 (replace-regexp-in-string r "" s1)) (s2 (replace-regexp-in-string r "" s2))) (string< s1 s2))) -- cgit 1.4.1-21-gabe81