emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/transient be119ee: Export variables for transient non-i


From: Jonas Bernoulli
Subject: [elpa] externals/transient be119ee: Export variables for transient non-infix suffixes
Date: Sun, 19 Sep 2021 06:12:26 -0400 (EDT)

branch: externals/transient
commit be119ee43fe5f6af2469d366f6ab84204255038d
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    Export variables for transient non-infix suffixes
    
    Unlike infixes, which change the value, non-infix suffixes are
    supposed to use the value.  Just because they are made transient,
    that doesn't mean they should fall back to the default value and
    have no access to other state variables that need to be exported.
    
    It was clearly unintentional to use the non-exporting pre-command
    for non-infix suffixes when the value of `transient' is just t.
    
    Closes #151.
---
 lisp/transient.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 4d1df2f..abae5b7 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1611,9 +1611,10 @@ of the corresponding object.")
           (define-key map (vector sym)
             (let ((do (oref obj transient)))
               (pcase do
-                (`t (if sub-prefix
-                        'transient--do-replace
-                      'transient--do-stay))
+                (`t (cond (sub-prefix 'transient--do-replace)
+                          ((cl-typep obj 'transient-infix)
+                           'transient--do-stay)
+                          (t 'transient--do-call)))
                 (`nil 'transient--do-exit)
                 (_ do)))))
          ((not (lookup-key transient-predicate-map (vector sym)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]