aboutsummaryrefslogtreecommitdiff
path: root/lisp/magit-subtree.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2023-07-31 11:12:00 +0200
committerJonas Bernoulli <jonas@bernoul.li>2023-07-31 11:12:00 +0200
commite8152c76bf636805c0eb9027083d0ff10d28d1a8 (patch)
tree51964073378f240b9ab7642728e7ac5c9f5a5a51 /lisp/magit-subtree.el
parent9f403b68e87982da16253d3308cda194c11133f2 (diff)
Use if-let instead of --if-let
I haven't done a full 180 on anaphoric conditionals; if a builtin equivalent existed, I would use that in some instances. However, having looked at all the existing uses of `if-let', it turns out there are way fewer such cases than I had anticipated.
Diffstat (limited to 'lisp/magit-subtree.el')
-rw-r--r--lisp/magit-subtree.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/magit-subtree.el b/lisp/magit-subtree.el
index 8621cd0..dae1661 100644
--- a/lisp/magit-subtree.el
+++ b/lisp/magit-subtree.el
@@ -107,9 +107,9 @@
:reader #'magit-transient-read-revision)
(defun magit-subtree-prefix (transient prompt)
- (--if-let (--first (string-prefix-p "--prefix=" it)
- (transient-args transient))
- (substring it 9)
+ (if-let ((arg (--first (string-prefix-p "--prefix=" it)
+ (transient-args transient))))
+ (substring arg 9)
(magit-subtree-read-prefix prompt)))
(defun magit-subtree-arguments (transient)