From b03d9dc0b6bf1800d49a8c249c4f1f161d64028c Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Wed, 22 Apr 2026 18:36:26 +0200 Subject: Add kludge for mystery issue involving static-if and defalias 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' more than once, last in https://github.com/magit/magit/issues/5557, and while I was never able to reproduce, I concluded that these report are credible. --- lisp/transient.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/transient.el b/lisp/transient.el index 25bc8f1..c4091a3 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -5194,7 +5194,8 @@ apply the face `transient-unreachable' to the complete string." (oref group suffixes)))))) (static-if (fboundp 'string-pixel-width) ; since Emacs 29.1 - (defalias 'transient--string-pixel-width #'string-pixel-width) + (progn ; See https://github.com/magit/magit/issues/5557. + (defalias 'transient--string-pixel-width #'string-pixel-width)) ;; c22b735f0c6 and 61c254cafc9 cannot be backported. Some later ;; commits could be ported, but users should instead update Emacs. (defun transient--string-pixel-width (string) -- cgit v1.0