[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/git-commit 0bbf31a2ef: magit--git-variable:choices: Suppor
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/git-commit 0bbf31a2ef: magit--git-variable:choices: Support fallback instead of default |
Date: |
Wed, 6 Apr 2022 15:58:10 -0400 (EDT) |
branch: elpa/git-commit
commit 0bbf31a2efd769ac2a4734358b4da08a596e9514
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
magit--git-variable:choices: Support fallback instead of default
This is for `forge-forge.remote'. There no longer is a constant
default for the Git variable `forge.remote'. Instead Forge tries to
guess which remote likely is the upstream if `forge.remote' isn't set
explicitly. Use the "dwim:" prefix instead of "default:" to hint at
this.
---
lisp/magit-transient.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/lisp/magit-transient.el b/lisp/magit-transient.el
index 52745b4e9e..3957e51b73 100644
--- a/lisp/magit-transient.el
+++ b/lisp/magit-transient.el
@@ -169,7 +169,8 @@
(globalp (oref obj global))
(value nil)
(global (magit-git-string "config" "--global" variable))
- (default (oref obj default))
+ (defaultp (oref obj default))
+ (default (if (functionp defaultp) (funcall defaultp obj) defaultp))
(fallback (oref obj fallback))
(fallback (and fallback
(when-let ((val (magit-get fallback)))
@@ -209,7 +210,9 @@
'transient-inactive-value
'transient-value)))
(default
- (propertize (concat "default:" default)
+ (propertize (if (functionp defaultp)
+ (concat "dwim:" default)
+ (concat "default:" default))
'face (if value
'transient-inactive-value
'transient-value))))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/git-commit 0bbf31a2ef: magit--git-variable:choices: Support fallback instead of default,
ELPA Syncer <=