aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarty hiatt <martianhiatus@riseup.net>2024-10-14 17:16:50 +0200
committermarty hiatt <martianhiatus@riseup.net>2024-10-14 17:16:50 +0200
commite07fc229966a978fb22c741f40526301f204299f (patch)
treeb4769858147fe814185a5c7835bb240b9be7c4b0
parent17bcc1ff7659b4eb6845a564a094bb3cae4fadd9 (diff)
Revert "transient: factor out a field infix, to simplify mastodon-profile-fields"
This reverts commit 96057a1b090b93adf4e72781e8894aae9f158588.
-rw-r--r--lisp/mastodon-transient.el25
1 files changed, 11 insertions, 14 deletions
diff --git a/lisp/mastodon-transient.el b/lisp/mastodon-transient.el
index dcf8fa4..fe70eac 100644
--- a/lisp/mastodon-transient.el
+++ b/lisp/mastodon-transient.el
@@ -173,15 +173,15 @@ the format fields.X.keyname."
[:description
"Fields"
["Name"
- ("1 n" "" mastodon-transient-field-infix :alist-key fields.1.name)
- ("2 n" "" mastodon-transient-field-infix :alist-key fields.2.name)
- ("3 n" "" mastodon-transient-field-infix :alist-key fields.3.name)
- ("4 n" "" mastodon-transient-field-infix :alist-key fields.4.name)]
+ ("1 n" "" "fields.1.name" :alist-key fields.1.name :class mastodon-transient-field)
+ ("2 n" "" "fields.2.name" :alist-key fields.2.name :class mastodon-transient-field)
+ ("3 n" "" "fields.3.name" :alist-key fields.3.name :class mastodon-transient-field)
+ ("4 n" "" "fields.4.name" :alist-key fields.4.name :class mastodon-transient-field)]
["Value"
- ("1 v" "" mastodon-transient-field-infix :alist-key fields.1.value)
- ("2 v" "" mastodon-transient-field-infix :alist-key fields.2.value)
- ("3 v" "" mastodon-transient-field-infix :alist-key fields.3.value)
- ("4 v" "" mastodon-transient-field-infix :alist-key fields.4.value)]]
+ ("1 v" "" "fields.1.value" :alist-key fields.1.value :class mastodon-transient-field)
+ ("2 v" "" "fields.2.value" :alist-key fields.2.value :class mastodon-transient-field)
+ ("3 v" "" "fields.3.value" :alist-key fields.3.value :class mastodon-transient-field)
+ ("4 v" "" "fields.4.value" :alist-key fields.4.value :class mastodon-transient-field)]]
["Update"
("C-c C-c" "Save settings" mastodon-profile-fields-update)
("C-c C-k" :info "Revert all changes")]
@@ -193,12 +193,9 @@ the format fields.X.keyname."
;;; CLASSES
(defclass mastodon-transient-field (tp-option-str)
- ()
- "An infix for our fields options.")
-
-(transient-define-infix mastodon-transient-field-infix ()
- :class 'mastodon-transient-field
- :argument "junk")
+ ((always-read :initarg :always-read :initform t))
+ "An infix option class for our options.
+We always read.")
(cl-defmethod transient-init-value ((obj mastodon-transient-field))
"Initialize value of OBJ."