aboutsummaryrefslogtreecommitdiff
path: root/lisp/magit-refs.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2025-08-22 20:55:30 +0200
committerJonas Bernoulli <jonas@bernoul.li>2025-08-22 20:55:30 +0200
commitda52ac901247b12241504e9baf89275c13b41def (patch)
tree97664ce6735c0606660dfe88647a7d046546e840 /lisp/magit-refs.el
parent7de0f1335f8c4954d6d07413c5ec19fc8200078c (diff)
Revert "Remove kludge for and-let* bug in older Emacs releases"
This reverts commit 92020002b3f162e26af11f1a01c21bb18111b1cc. These `progn' used to be necessary because `and-let*' used to behave like `if'. That bug was fixed in Emacs 27.1 -- since then it behaves like `when', as its author intended. However, going forward we will use the `and-let*' implementation from the `cond-let' package and that takes a single BODYFORM. Sometimes it would be convenient if it supported multiple BODY forms and they behaved like those were wrapped with `progn' and other times like they were wrapped with `and', and we could determine which would be useful more often and the optimize for that. Requiring an explicit `and' or `progn' is better, especially when the author is forced to call out the fact that there *also* is a side-effect.
Diffstat (limited to 'lisp/magit-refs.el')
-rw-r--r--lisp/magit-refs.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/magit-refs.el b/lisp/magit-refs.el
index 47bcf1e..6b29c23 100644
--- a/lisp/magit-refs.el
+++ b/lisp/magit-refs.el
@@ -366,8 +366,9 @@ Type \\[magit-reset] to reset `HEAD' to the commit at point.
(and-let* ((buffer (magit-get-mode-buffer
'magit-refs-mode nil
(eq use-buffer-args 'selected))))
- (setq args (buffer-local-value 'magit-buffer-arguments buffer))
- t)))
+ (progn
+ (setq args (buffer-local-value 'magit-buffer-arguments buffer))
+ t))))
(t
(setq args (alist-get 'magit-show-refs transient-values))))
args))