summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
authorCase Duckworth2021-10-05 14:22:18 -0500
committerCase Duckworth2021-10-05 14:22:18 -0500
commit66ecd92944d7d169c0760402f7b8fd0a2f255958 (patch)
treeca4613eab72d785aa8fe1e3eac320a6867c2e593 /lisp
parentDon't pulse line (diff)
downloademacs-66ecd92944d7d169c0760402f7b8fd0a2f255958.tar.gz
emacs-66ecd92944d7d169c0760402f7b8fd0a2f255958.zip
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/acdw-setup.el3
-rw-r--r--lisp/acdw.el2
2 files changed, 3 insertions, 2 deletions
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."
72 (car recipe) 72 (car recipe)
73 recipe)))) 73 recipe))))
74 74
75(setup-define :straight-if 75(setup-define :straight-when
76 (lambda (recipe condition) 76 (lambda (recipe condition)
77 `(if ,condition 77 `(if ,condition
78 (straight-use-package ',recipe) 78 (straight-use-package ',recipe)
@@ -83,6 +83,7 @@ If CONDITION is false, stop evaluating the body. This macro can
83be used as HEAD, and will replace itself with the RECIPE's 83be used as HEAD, and will replace itself with the RECIPE's
84package. This macro is not repeatable." 84package. This macro is not repeatable."
85 :repeatable nil 85 :repeatable nil
86 :indent 1
86 :shorthand (lambda (sexp) 87 :shorthand (lambda (sexp)
87 (let ((recipe (cadr sexp))) 88 (let ((recipe (cadr sexp)))
88 (if (consp recipe) (car recipe) recipe)))) 89 (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!!!"
352 (cond 352 (cond
353 ;; Straight forms require some weirdness 353 ;; Straight forms require some weirdness
354 ((and s1-straight s2-straight) 354 ((and s1-straight s2-straight)
355 (let* ((r (rx ":straight" (? "-if") (* space) (? "("))) 355 (let* ((r (rx ":straight" (? "-when") (* space) (? "(")))
356 (s1 (replace-regexp-in-string r "" s1)) 356 (s1 (replace-regexp-in-string r "" s1))
357 (s2 (replace-regexp-in-string r "" s2))) 357 (s2 (replace-regexp-in-string r "" s2)))
358 (string< s1 s2))) 358 (string< s1 s2)))