[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient 76647bfb9b 17/23: transient--inapt-suffix-p:
From: |
Jonas Bernoulli |
Subject: |
[elpa] externals/transient 76647bfb9b 17/23: transient--inapt-suffix-p: Return t if parent is inapt |
Date: |
Sun, 22 Dec 2024 08:44:40 -0500 (EST) |
branch: externals/transient
commit 76647bfb9b6e3306fcfe7a1bc7cda60223c732f2
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
transient--inapt-suffix-p: Return t if parent is inapt
Instead of making the callers do it. One caller didn't do it before,
which was a mistake.
---
lisp/transient.el | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/lisp/transient.el b/lisp/transient.el
index a3207c273d..4b09bead8c 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -2261,8 +2261,7 @@ value. Otherwise return CHILDREN as is.")
(obj (apply class :parent parent :level level args))
((transient--use-suffix-p obj))
((prog1 t
- (when (or (and parent (oref parent inapt))
- (transient--inapt-suffix-p obj))
+ (when (transient--inapt-suffix-p obj)
(oset obj inapt t))))
(suffixes (mapcan (lambda (c) (transient--init-child levels c
obj))
(transient-setup-children obj children))))
@@ -2304,8 +2303,7 @@ value. Otherwise return CHILDREN as is.")
(unless (cl-typep obj 'transient-information)
(transient--init-suffix-key obj))
(when (transient--use-suffix-p obj)
- (if (or (and parent (oref parent inapt))
- (transient--inapt-suffix-p obj))
+ (if (transient--inapt-suffix-p obj)
(oset obj inapt t)
(transient-init-scope obj)
(transient-init-value obj))
@@ -2347,18 +2345,20 @@ value. Otherwise return CHILDREN as is.")
t)))
(defun transient--inapt-suffix-p (obj)
- (let ((transient--shadowed-buffer (current-buffer))
- (transient--pending-suffix obj))
- (transient--do-suffix-p
- (oref obj inapt-if)
- (oref obj inapt-if-not)
- (oref obj inapt-if-nil)
- (oref obj inapt-if-non-nil)
- (oref obj inapt-if-mode)
- (oref obj inapt-if-not-mode)
- (oref obj inapt-if-derived)
- (oref obj inapt-if-not-derived)
- nil)))
+ (or (and-let* ((parent (oref obj parent)))
+ (oref parent inapt))
+ (let ((transient--shadowed-buffer (current-buffer))
+ (transient--pending-suffix obj))
+ (transient--do-suffix-p
+ (oref obj inapt-if)
+ (oref obj inapt-if-not)
+ (oref obj inapt-if-nil)
+ (oref obj inapt-if-non-nil)
+ (oref obj inapt-if-mode)
+ (oref obj inapt-if-not-mode)
+ (oref obj inapt-if-derived)
+ (oref obj inapt-if-not-derived)
+ nil))))
(defun transient--do-suffix-p
(if if-not if-nil if-non-nil if-mode if-not-mode if-derived if-not-derived
- [elpa] externals/transient 03ef2e7566 19/23: transient-toggle-common: Define using transient-define-suffix, (continued)
- [elpa] externals/transient 03ef2e7566 19/23: transient-toggle-common: Define using transient-define-suffix, Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient fe71a7e7d6 07/23: Account for duplicated commands with different transient behavior, Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient e1126a6ffc 06/23: transient--display-action: Pre-calculate frame dimensions, Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient eebcbe306c 11/23: Support including a top-level group from a variable, Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient 28347e59c4 12/23: transient--insert-group(:around): Add ignored optional second argument, Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient fd9811ea1a 13/23: transient--fit-window-to-buffer: Also fit horizontally, Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient a45ac41152 15/23: transient--show: No longer redo setup on every refresh, Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient 88031d6891 14/23: transient--delete-window: Ensure buffer is always killed, Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient 667ce2b287 18/23: Use transient-default-value in transient-init-value(suffix), Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient 184d0074e8 16/23: Store parent group in suffix and subgroup objects, Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient 76647bfb9b 17/23: transient--inapt-suffix-p: Return t if parent is inapt,
Jonas Bernoulli <=
- [elpa] externals/transient 54d116b9ae 08/23: transient--get-pre-command: Change argument order, Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient be2189ab3c 10/23: transient-prefix: Remove unused variable slot, Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient 52679f9853 22/23: transient-toggle-docstrings: New command, Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient 5a18a79100 23/23: transient-describe: New command, Jonas Bernoulli, 2024/12/22
- [elpa] externals/transient 042f37aa66 21/23: transient-copy-menu-text: New command, Jonas Bernoulli, 2024/12/22