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

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

[elpa] externals/transient 59d8c0342a 18/41: transient--unset-incompatib


From: Jonas Bernoulli
Subject: [elpa] externals/transient 59d8c0342a 18/41: transient--unset-incompatible: Remove unnecessary variable
Date: Sun, 12 Nov 2023 20:04:08 -0500 (EST)

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

    transient--unset-incompatible: Remove unnecessary variable
    
    When a variable is set to a non-nil value, then the value of all
    incompatible variables has to be set to nil.  Setting these other
    variables to nil is unproblematic, we don't have to do anything
    special; the mere fact that we are setting to nil, not non-nil,
    prevents a cascading effect.
---
 lisp/transient.el | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 2b6328e358..5087a7f770 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -3178,8 +3178,6 @@ prompt."
 
 ;;;; Set
 
-(defvar transient--unset-incompatible t)
-
 (cl-defgeneric transient-infix-set (obj value)
   "Set the value of infix object OBJ to value.")
 
@@ -3192,7 +3190,7 @@ prompt."
   (let ((arg (if (slot-boundp obj 'argument)
                  (oref obj argument)
                (oref obj argument-regexp))))
-    (if-let ((sic (and value arg transient--unset-incompatible))
+    (if-let ((sic (and value arg))
              (spec (oref transient--prefix incompatible))
              (incomp (cl-mapcan (lambda (rule)
                                   (and (member arg rule)
@@ -3207,8 +3205,7 @@ prompt."
                                     (slot-boundp obj 'argument)
                                     (equal (oref obj argument) arg)))
                              transient--suffixes)))
-              (let ((transient--unset-incompatible nil))
-                (transient-infix-set obj nil)))))
+              (transient-infix-set obj nil))))
       (cl-call-next-method obj value))))
 
 (cl-defgeneric transient-set-value (obj)



reply via email to

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