[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient 8b988fc4bd 03/20: Use the other variant of th
From: |
Jonas Bernoulli |
Subject: |
[elpa] externals/transient 8b988fc4bd 03/20: Use the other variant of the and-let* kludge |
Date: |
Tue, 24 Oct 2023 13:42:15 -0400 (EDT) |
branch: externals/transient
commit 8b988fc4bd9031f25964b09853277c325703b504
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Use the other variant of the and-let* kludge
---
lisp/transient.el | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/lisp/transient.el b/lisp/transient.el
index f860aea16b..4f04cb958f 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1477,12 +1477,12 @@ probably use this instead:
(listify-key-sequence (this-command-keys))))
suffixes))
(car suffixes)))
- (when-let* ((obj (get (or command this-command) 'transient--suffix))
- (obj (clone obj)))
- ;; Cannot use and-let* because of debbugs#31840.
- (transient-init-scope obj)
- (transient-init-value obj)
- obj)))
+ (and-let* ((obj (get (or command this-command) 'transient--suffix))
+ (obj (clone obj)))
+ (progn ; work around debbugs#31840
+ (transient-init-scope obj)
+ (transient-init-value obj)
+ obj))))
;;; Keymaps
@@ -1865,14 +1865,14 @@ value. Otherwise return CHILDREN as is."
(defun transient--init-group (levels spec)
(pcase-let ((`(,level ,class ,args ,children) (append spec nil)))
- (when-let* ((- (transient--use-level-p level))
- (obj (apply class :level level args))
- (- (transient--use-suffix-p obj))
- (suffixes (cl-mapcan (lambda (c) (transient--init-child levels
c))
- (transient-setup-children obj children))))
- ;; Cannot use and-let* because of debbugs#31840.
- (oset obj suffixes suffixes)
- (list obj))))
+ (and-let* ((- (transient--use-level-p level))
+ (obj (apply class :level level args))
+ (- (transient--use-suffix-p obj))
+ (suffixes (cl-mapcan (lambda (c) (transient--init-child levels
c))
+ (transient-setup-children obj children))))
+ (progn ; work around debbugs#31840
+ (oset obj suffixes suffixes)
+ (list obj)))))
(defun transient--init-suffix (levels spec)
(pcase-let* ((`(,level ,class ,args) spec)
- [elpa] externals/transient updated (04f87b4ab3 -> 4f67a033fd), Jonas Bernoulli, 2023/10/24
- [elpa] externals/transient 3e43f1fd90 04/20: transient--pixel-width: Move definition, Jonas Bernoulli, 2023/10/24
- [elpa] externals/transient c2a75880ae 14/20: transient-suffix: Add FACE slot, Jonas Bernoulli, 2023/10/24
- [elpa] externals/transient 8b988fc4bd 03/20: Use the other variant of the and-let* kludge,
Jonas Bernoulli <=
- [elpa] externals/transient dd7ed3869b 01/20: Indent code blocks in docstrings consistently, Jonas Bernoulli, 2023/10/24
- [elpa] externals/transient a19c0bda1d 05/20: transient--window: Tweak docstring, Jonas Bernoulli, 2023/10/24
- [elpa] externals/transient a80307c7ce 06/20: transient--current-buffer: New variable, Jonas Bernoulli, 2023/10/24
- [elpa] externals/transient fb191f8cf3 08/20: Optionally refresh suffixes and keymaps after every command, Jonas Bernoulli, 2023/10/24
- [elpa] externals/transient a81eff942b 11/20: transient-font-lock-keywords: Remove transient-define-groups, Jonas Bernoulli, 2023/10/24
- [elpa] externals/transient 49a61fb905 13/20: Support setting per-suffix level for duplicated commands, Jonas Bernoulli, 2023/10/24
- [elpa] externals/transient 2776dbc07c 16/20: transient--flatten-suffixes: Cosmetics, Jonas Bernoulli, 2023/10/24
- [elpa] externals/transient aee5f23447 09/20: Improve docstrings, Jonas Bernoulli, 2023/10/24
- [elpa] externals/transient f8209cc8f4 15/20: transient--maybe-pad-keys: Ignore raw strings, Jonas Bernoulli, 2023/10/24
- [elpa] externals/transient ae4ac656b1 18/20: transient-group: Always bind PAD-KEYS slot, Jonas Bernoulli, 2023/10/24