[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient 017eb7b3cb 07/17: Explicitly define generic f
From: |
Jonas Bernoulli |
Subject: |
[elpa] externals/transient 017eb7b3cb 07/17: Explicitly define generic functions |
Date: |
Fri, 25 Mar 2022 06:22:15 -0400 (EDT) |
branch: externals/transient
commit 017eb7b3cb631bb432066539c459bfa96afa0543
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Explicitly define generic functions
The byte-compiler of Emacs 29 went completely berserk and so
I learned that it recently stopped being possible to define
a method for a (previously undefined) function without first
explicitly declaring it as a generic function.
---
lisp/transient.el | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/lisp/transient.el b/lisp/transient.el
index 31b79947de..5aa7b6e6fb 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -2522,7 +2522,7 @@ transient is active."
(transient-save-value (or transient--prefix transient-current-prefix)))
(defun transient-reset ()
- "Clear the set and saved value of the active transient."
+ "Clear the set and saved values of the active transient."
(interactive)
(transient-reset-value (or transient--prefix transient-current-prefix)))
@@ -2916,12 +2916,18 @@ prompt."
(transient-infix-set obj nil)))))
(cl-call-next-method obj value))))
+(cl-defgeneric transient-set-value (obj)
+ "Set the value of the transient prefix OBJ.")
+
(cl-defmethod transient-set-value ((obj transient-prefix))
(oset (oref obj prototype) value (transient-get-value))
(transient--history-push obj))
;;;; Save
+(cl-defgeneric transient-save-value (obj)
+ "Save the value of the transient prefix OBJ.")
+
(cl-defmethod transient-save-value ((obj transient-prefix))
(let ((value (transient-get-value)))
(oset (oref obj prototype) value value)
@@ -2931,6 +2937,9 @@ prompt."
;;;; Reset
+(cl-defgeneric transient-reset-value (obj)
+ "Clear the set and saved values of the transient prefix OBJ.")
+
(cl-defmethod transient-reset-value ((obj transient-prefix))
(let ((value (transient-default-value obj)))
(oset obj value value)
- [elpa] externals/transient updated (7c771c94c8 -> 132090a4b6), Jonas Bernoulli, 2022/03/25
- [elpa] externals/transient 8d28d6ca5c 01/17: transient-reset: Fix docstring typo, Jonas Bernoulli, 2022/03/25
- [elpa] externals/transient 06697f75ac 11/17: Only use this-original-command when necessary, Jonas Bernoulli, 2022/03/25
- [elpa] externals/transient 45ef6df3fb 03/17: Update changelog, Jonas Bernoulli, 2022/03/25
- [elpa] externals/transient 08ebdbc85d 02/17: manual: Mention more additions since last release, Jonas Bernoulli, 2022/03/25
- [elpa] externals/transient 8bd182c2de 05/17: Add ignore rules for ELPA, Jonas Bernoulli, 2022/03/25
- [elpa] externals/transient af49fd9447 04/17: Use more function quotes, Jonas Bernoulli, 2022/03/25
- [elpa] externals/transient 017eb7b3cb 07/17: Explicitly define generic functions,
Jonas Bernoulli <=
- [elpa] externals/transient da97c6d18a 06/17: Revert most of "Use more function quotes", Jonas Bernoulli, 2022/03/25
- [elpa] externals/transient 0619c7ef19 08/17: Automatically publish statistics, Jonas Bernoulli, 2022/03/25
- [elpa] externals/transient 31d355b596 10/17: transient-set-level: Refresh shown levels after setting one, Jonas Bernoulli, 2022/03/25
- [elpa] externals/transient dd67ff9061 12/17: transient--do-pre-command: New function, Jonas Bernoulli, 2022/03/25
- [elpa] externals/transient bb056e7156 13/17: Invoke suffix commands directly when a button is pushed, Jonas Bernoulli, 2022/03/25
- [elpa] externals/transient 132090a4b6 17/17: transient-enable-popup-navigation: Enable by default, Jonas Bernoulli, 2022/03/25
- [elpa] externals/transient 75a44f5058 16/17: transient-enable-popup-navigation: Improve docstring, Jonas Bernoulli, 2022/03/25
- [elpa] externals/transient ecf340cbff 09/17: make: Set GITSTATS, Jonas Bernoulli, 2022/03/25
- [elpa] externals/transient 98d5020238 14/17: transient-popup-navigation-map: No longer bind C-p and C-n, Jonas Bernoulli, 2022/03/25
- [elpa] externals/transient 5c746f3146 15/17: No longer consider popup navigation a secondary feature, Jonas Bernoulli, 2022/03/25