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

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

[elpa] externals/transient 75f0aef8d7 04/25: Add new "Scope" top-level s


From: Jonas Bernoulli
Subject: [elpa] externals/transient 75f0aef8d7 04/25: Add new "Scope" top-level section
Date: Tue, 3 Dec 2024 14:35:00 -0500 (EST)

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

    Add new "Scope" top-level section
---
 lisp/transient.el | 37 +++++++++++++++++++++----------------
 1 file changed, 21 insertions(+), 16 deletions(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index d25dc76592..14b63598c7 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -3189,22 +3189,6 @@ such as when suggesting a new feature or reporting an 
issue."
 ;;; Value
 ;;;; Init
 
-(cl-defgeneric transient-init-scope (obj)
-  "Set the scope of the suffix object OBJ.
-
-The scope is actually a property of the transient prefix, not of
-individual suffixes.  However it is possible to invoke a suffix
-command directly instead of from a transient.  In that case, if
-the suffix expects a scope, then it has to determine that itself
-and store it in its `scope' slot.
-
-This function is called for all suffix commands, but unless a
-concrete method is implemented this falls through to the default
-implementation, which is a noop.")
-
-(cl-defmethod transient-init-scope ((_   transient-suffix))
-  "Noop." nil)
-
 (cl-defgeneric transient-init-value (_)
   "Set the initial value of the object OBJ.
 
@@ -3653,6 +3637,27 @@ the option does not appear in ARGS."
           (or (match-string 1 match) "")))
     (and (member arg args) t)))
 
+;;; Scope
+;;;; Init
+
+(cl-defgeneric transient-init-scope (obj)
+  "Set the scope of the suffix object OBJ.
+
+The scope is actually a property of the transient prefix, not of
+individual suffixes.  However it is possible to invoke a suffix
+command directly instead of from a transient.  In that case, if
+the suffix expects a scope, then it has to determine that itself
+and store it in its `scope' slot.
+
+This function is called for all suffix commands, but unless a
+concrete method is implemented this falls through to the default
+implementation, which is a noop.")
+
+(cl-defmethod transient-init-scope ((_   transient-suffix))
+  "Noop." nil)
+
+;;;; Get
+
 (defun transient-scope ()
   "Return the value of the `scope' slot of the current prefix."
   (oref (transient-prefix-object) scope))



reply via email to

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