From bf9f861025805d7e3c01fb1cfea32f02efebb04e Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Wed, 22 Apr 2026 18:27:03 +0200 Subject: Add kludge for mystery issue involving static-if It appears that for some users `static-if' expands to nothing if the THEN or ELSE part is a `defalias' form (whichever is used in their case). I got similar reports when using `static-if' like this in other packages, but I was never able to reproduce these issues. Workaround this by placing the `static-if' inside the `defalias'. Another workaround, which appears to work, would be to wrap both THEN and ELSE with `progn'. Closes #5557. --- lisp/magit-base.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp/magit-base.el b/lisp/magit-base.el index 0c50e72..415b707 100644 --- a/lisp/magit-base.el +++ b/lisp/magit-base.el @@ -1030,9 +1030,8 @@ If PROPS is nil, remove all properties." ;;; Emacs Compatibility -(static-if (fboundp 'member-if) ; Emacs 31.1 - (defalias 'magit--any 'member-if) - (defalias 'magit--any 'cl-member-if)) +(defalias 'magit--any ; Emacs 31.1 adds member-if + (static-if (fboundp 'member-if) #'member-if #'cl-member-if)) ;;; Kludges for Emacs Bugs -- cgit v1.0