[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))
- [elpa] externals/transient aaefee0d01 03/25: Remove comments mentioning a legacy Emacs bug, (continued)
- [elpa] externals/transient aaefee0d01 03/25: Remove comments mentioning a legacy Emacs bug, Jonas Bernoulli, 2024/12/03
- [elpa] externals/transient 3b28a2f8d6 12/25: transient-hide-during-minibuffer-read: Change default to t, Jonas Bernoulli, 2024/12/03
- [elpa] externals/transient 3539231b98 20/25: fixup(e3e2e111): Improve options for showing menu during minibuffer use, Jonas Bernoulli, 2024/12/03
- [elpa] externals/transient 645f1b2cd4 25/25: transient--stack-push: Preserve the value, Jonas Bernoulli, 2024/12/03
- [elpa] externals/transient d64b73efbc 17/25: transient-scope: Return nil if all prefixes are nil, Jonas Bernoulli, 2024/12/03
- [elpa] externals/transient ecdee415fb 16/25: transient-scope: Fully revert behavior with no argument, Jonas Bernoulli, 2024/12/03
- [elpa] externals/transient b3f3aa034a 09/25: transient-init-value: Define noop method for transient-suffix, Jonas Bernoulli, 2024/12/03
- [elpa] externals/transient 4130f62966 11/25: transient--show: Run transient-setup-buffer-hook later, Jonas Bernoulli, 2024/12/03
- [elpa] externals/transient 24a1be509b 02/25: docs: Fix word order, Jonas Bernoulli, 2024/12/03
- [elpa] externals/transient d0cba152dc 06/25: transient-scope: Add PREFIX argument, Jonas Bernoulli, 2024/12/03
- [elpa] externals/transient 75f0aef8d7 04/25: Add new "Scope" top-level section,
Jonas Bernoulli <=
- [elpa] externals/transient 9259f77e14 05/25: transient-args: Allow PREFIX to be a list of prefixes, Jonas Bernoulli, 2024/12/03
- [elpa] externals/transient 6b83a02151 08/25: transient-init-scope: Add stub method for prefixes, Jonas Bernoulli, 2024/12/03
- [elpa] externals/transient 37be15575a 23/25: fixup(e3e2e111): Improve options for showing menu during minibuffer use, Jonas Bernoulli, 2024/12/03
- [elpa] externals/transient 4de5812992 15/25: transient-scope: Fix recent regression, Jonas Bernoulli, 2024/12/03
- [elpa] externals/transient 51f25c21b8 24/25: Fix typos in documentation, Jonas Bernoulli, 2024/12/03
- [elpa] externals/transient cb5e1e5594 18/25: transient-scope: Redesign, Jonas Bernoulli, 2024/12/03
- [elpa] externals/transient 23cb5b109d 22/25: transient-prefix: Add mode-line-format slot, Jonas Bernoulli, 2024/12/03
- [elpa] externals/transient e3e2e1112f 19/25: Improve options for showing menu during minibuffer use, Jonas Bernoulli, 2024/12/03
- [elpa] externals/transient 7e50a8fa8e 14/25: Check validity of transient-display-buffer-action, Jonas Bernoulli, 2024/12/03
- [elpa] externals/transient 590181262b 21/25: transient-prefix: Add display-action slot, Jonas Bernoulli, 2024/12/03