aboutsummaryrefslogtreecommitdiff
path: root/lisp/magit-remote.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2023-12-02 16:51:18 +0100
committerJonas Bernoulli <jonas@bernoul.li>2023-12-02 16:51:18 +0100
commit5ad367d7a3094fb6098c1d8e457ed80630ed3e5e (patch)
treea4866df5f62c5f589d284ec7a7f2eba96e1136a8 /lisp/magit-remote.el
parentfb0a0202175832d75bbcfe3ef1f53b969c50e93f (diff)
Favor transient-prefix-object over transient--prefix
This function just returns the value of (or transient--prefix transient-current-prefix) and was added so that authors of transient commands would not have to worry about when to use which variable. Since many will refer to Magit as a source of examples, I do here what I recommend to keep things simple. I'm leaving the uses of `transient--prefix' in "magit-transient.el" intact, because there, they are used in methods, and implementing your own methods is considered advanced usage.
Diffstat (limited to 'lisp/magit-remote.el')
-rw-r--r--lisp/magit-remote.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/magit-remote.el b/lisp/magit-remote.el
index eb6a6c7..e010c92 100644
--- a/lisp/magit-remote.el
+++ b/lisp/magit-remote.el
@@ -70,7 +70,7 @@ has to be used to view and change remote related variables."
["Variables"
:if (lambda ()
(and magit-remote-direct-configure
- (oref transient--prefix scope)))
+ (oref (transient-prefix-object) scope)))
("u" magit-remote.<remote>.url)
("U" magit-remote.<remote>.fetch)
("s" magit-remote.<remote>.pushurl)
@@ -314,9 +314,9 @@ refspec."
:man-page "git-remote"
[:description
(lambda ()
- (concat
- (propertize "Configure " 'face 'transient-heading)
- (propertize (oref transient--prefix scope) 'face 'magit-branch-remote)))
+ (concat (propertize "Configure " 'face 'transient-heading)
+ (propertize (oref (transient-prefix-object) scope)
+ 'face 'magit-branch-remote)))
("u" magit-remote.<remote>.url)
("U" magit-remote.<remote>.fetch)
("s" magit-remote.<remote>.pushurl)