branch: externals/transient commit 8806655538187d69dd18e7755024af0f56460600 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
transient-help: Fix regression That is one of those surprise bug fixes. While investigating why `transient-help' no longer worked, I noticed that it needlessly used `called-interactively-p'. To my surprise, changing that, also fixed the issue I was about to work on. oO As I recently learned, `called-interactively-p' should be avoided if at all possible. It is inherently a hack and not guaranteed to always work correctly. This commit fixes a regression that was introduced with [1: 51c68c8], where we started to advise `this-command'; so it appears the use of around advice is one of the things that can cause this function to misbehave. 1: 2023-02-08 51c68c87cc66322db2ee3d85b6f5fc8b941a2ed6 Use around advice to deal with skipped post-command-hook --- lisp/transient.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/transient.el b/lisp/transient.el index 57af38d6a1..cf28afd8be 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -2573,10 +2573,10 @@ transient is active." (defvar transient-resume-mode) -(defun transient-help () - "Show help for the active transient or one of its suffixes." - (interactive) - (if (called-interactively-p 'any) +(defun transient-help (&optional interactive) + "Show help for the active transient or one of its suffixes.\n\n(fn)" + (interactive (list t)) + (if interactive (setq transient--helpp t) (with-demoted-errors "transient-help: %S" (when (lookup-key transient--transient-map