diff options
| -rw-r--r-- | lisp/transient.el | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/lisp/transient.el b/lisp/transient.el index 4b06514..4f760af 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -2655,8 +2655,8 @@ value. Otherwise return CHILDREN as is.") (defun transient--wrap-command () (static-if (>= emacs-major-version 30) (letrec - ((prefix transient--prefix) - (suffix this-command) + ((cmd this-command) + (prefix transient--prefix) (advice (lambda (fn &rest args) (interactive @@ -2664,7 +2664,7 @@ value. Otherwise return CHILDREN as is.") (let ((abort t)) (unwind-protect (prog1 (let ((debugger #'transient--exit-and-debug)) - (if-let* ((obj (transient-suffix-object suffix)) + (if-let* ((obj (transient-suffix-object cmd)) (grp (oref obj parent)) (adv (or (oref obj advice*) (oref grp advice*)))) @@ -2675,12 +2675,12 @@ value. Otherwise return CHILDREN as is.") (when abort (when-let ((unwind (oref prefix unwind-suffix))) (transient--debug 'unwind-interactive) - (funcall unwind suffix)) - (advice-remove suffix advice) + (funcall unwind cmd)) + (advice-remove cmd advice) (oset prefix unwind-suffix nil)))))) (unwind-protect (let ((debugger #'transient--exit-and-debug)) - (if-let* ((obj (transient-suffix-object suffix)) + (if-let* ((obj (transient-suffix-object cmd)) (grp (oref obj parent)) (adv (or (oref obj advice) (oref grp advice) @@ -2690,24 +2690,24 @@ value. Otherwise return CHILDREN as is.") (apply fn args))) (when-let ((unwind (oref prefix unwind-suffix))) (transient--debug 'unwind-command) - (funcall unwind suffix)) - (advice-remove suffix advice) + (funcall unwind cmd)) + (advice-remove cmd advice) (oset prefix unwind-suffix nil))))) (when (symbolp this-command) - (advice-add suffix :around advice '((depth . -99)))) + (advice-add cmd :around advice '((depth . -99)))) (cl-assert (>= emacs-major-version 30) nil "Emacs was downgraded, making it necessary to recompile Transient")) ;; (< emacs-major-version 30) - (let* ((prefix transient--prefix) - (suffix this-command) + (let* ((cmd this-command) + (prefix transient--prefix) (advice nil) (advice-interactive (lambda (spec) (let ((abort t)) (unwind-protect (prog1 (let ((debugger #'transient--exit-and-debug)) - (if-let* ((obj (transient-suffix-object suffix)) + (if-let* ((obj (transient-suffix-object cmd)) (grp (oref obj parent)) (adv (or (oref obj advice*) (oref grp advice*)))) @@ -2718,14 +2718,14 @@ value. Otherwise return CHILDREN as is.") (when abort (when-let ((unwind (oref prefix unwind-suffix))) (transient--debug 'unwind-interactive) - (funcall unwind suffix)) - (advice-remove suffix advice) + (funcall unwind cmd)) + (advice-remove cmd advice) (oset prefix unwind-suffix nil)))))) (advice-body (lambda (fn &rest args) (unwind-protect (let ((debugger #'transient--exit-and-debug)) - (if-let* ((obj (transient-suffix-object suffix)) + (if-let* ((obj (transient-suffix-object cmd)) (grp (oref obj parent)) (adv (or (oref obj advice) (oref grp advice) @@ -2735,14 +2735,14 @@ value. Otherwise return CHILDREN as is.") (apply fn args))) (when-let ((unwind (oref prefix unwind-suffix))) (transient--debug 'unwind-command) - (funcall unwind suffix)) - (advice-remove suffix advice) + (funcall unwind cmd)) + (advice-remove cmd advice) (oset prefix unwind-suffix nil))))) (setq advice `(lambda (fn &rest args) (interactive ,advice-interactive) (apply ',advice-body fn args))) (when (symbolp this-command) - (advice-add suffix :around advice '((depth . -99))))))) + (advice-add cmd :around advice '((depth . -99))))))) (defun transient--premature-post-command () (and (equal (this-command-keys-vector) []) |
