branch: externals/transient
commit ae4ac656b173f782866fc7860cd05cb7b31a5cf9
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>
transient-group: Always bind PAD-KEYS slot
By not making a distinction between padding being disabled and padding
not being specified, subgroups loose the ability to disable padding
that was enabled in a parent group.
But that doesn't seem useful anyway; if one sibling group should not
use padding, while the others do, then it seems more reasonable to
just enable the padding individually.
This change also enables the next commit.
---
lisp/transient.el | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/lisp/transient.el b/lisp/transient.el
index cf5f9e3658..e87d145230 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -791,8 +791,8 @@ They become the value of this argument.")
((suffixes :initarg :suffixes :initform nil)
(hide :initarg :hide :initform nil)
(description :initarg :description :initform nil)
- (setup-children :initarg :setup-children)
- (pad-keys :initarg :pad-keys))
+ (pad-keys :initarg :pad-keys :initform nil)
+ (setup-children :initarg :setup-children))
"Abstract superclass of all group classes."
:abstract t)
@@ -3704,11 +3704,8 @@ If the OBJ's `key' is currently unreachable, then apply
the face
(and val (not (integerp val)) val)))
(defun transient--maybe-pad-keys (group &optional parent)
- (when-let ((pad (if (slot-boundp group 'pad-keys)
- (oref group pad-keys)
- (and parent
- (slot-boundp parent 'pad-keys)
- (oref parent pad-keys)))))
+ (when-let ((pad (or (oref group pad-keys)
+ (and parent (oref parent pad-keys)))))
(let ((width (apply #'max
(cons (if (integerp pad) pad 0)
(seq-keep (lambda (suffix)