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

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

[elpa] externals/transient 3771e1d58c 5/8: transient-default-value: Remo


From: Jonas Bernoulli
Subject: [elpa] externals/transient 3771e1d58c 5/8: transient-default-value: Remove transient-suffix method
Date: Fri, 6 Dec 2024 17:05:57 -0500 (EST)

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

    transient-default-value: Remove transient-suffix method
    
    In [1: eff2245b] we stopped defining default methods using
    `cl-defgeneric' and added explicit default methods were this seemed
    necessary, including for this function.
    
    Turns out it is not necessary in this case and even misleading, because
    for `transient-suffix' objects, `transient-init-value' does not actually
    use `transient-default-value', only for prefix objects.
    
    In the event that someone implements a `transient-init-value' method
    and that uses `transient-default-value', but fails to implement the
    corresponding method for the latter, that now results in an informative
    error message (instead of nil being used silently).
    
    (In the future we might want to start using `transient-default-value'
    for `transient-suffix' objects as well, but that will/would require
    changes to existing `transient-init-value' methods and thus shouldn't
    be done hastily.)
    
    1: 2024-12-05 eff2245b73ceb471afb0d74c78bf57994767d5b0
       Never use cl-defgeneric to define the default method
---
 lisp/transient.el | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 229c1bf06e..e9513ab338 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -3343,10 +3343,6 @@ that.  If the slot is unbound, return nil."
         default)
     nil))
 
-(cl-defmethod transient-default-value ((_   transient-suffix))
-  "Return nil."
-  nil)
-
 ;;;; Read
 
 (cl-defgeneric transient-infix-read (obj)



reply via email to

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