[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient ed992c58cd 094/366: Properly handle existing
From: |
Jonas Bernoulli |
Subject: |
[elpa] externals/transient ed992c58cd 094/366: Properly handle existing string pseudo suffixes |
Date: |
Tue, 25 Jan 2022 18:54:30 -0500 (EST) |
branch: externals/transient
commit ed992c58cd32600064e77d2989c20dbbdf746e76
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Properly handle existing string pseudo suffixes
... when manipulating existing real suffixes.
Closes #47.
---
lisp/transient.el | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/lisp/transient.el b/lisp/transient.el
index 46b05443e9..b107b97632 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -877,13 +877,15 @@ example, sets a variable use `define-infix-command'
instead.
((not mem)
(message "Cannot insert %S into %s; %s not found"
suffix prefix loc))
- ((not (eq (type-of suffix)
- (type-of elt)))
+ ((or (and (vectorp suffix) (not (vectorp elt)))
+ (and (listp suffix) (vectorp elt))
+ )
(message "Cannot place %S into %s at %s; %s"
suffix prefix loc
"suffixes and groups cannot be siblings"))
(t
- (when (listp suffix)
+ (when (and (listp suffix)
+ (listp elt))
(let ((key (plist-get (nth 2 suf) :key)))
(if (equal (transient--kbd key)
(transient--kbd (plist-get (nth 2 elt) :key)))
@@ -998,14 +1000,15 @@ See info node `(transient)Modifying Existing
Transients'."
(defun transient--group-member (loc group)
(cl-member-if (lambda (suffix)
- (let* ((def (nth 2 suffix))
- (cmd (plist-get def :command)))
- (if (symbolp loc)
- (eq cmd loc)
- (equal (transient--kbd
- (or (plist-get def :key)
- (transient--command-key cmd)))
- loc))))
+ (and (listp suffix)
+ (let* ((def (nth 2 suffix))
+ (cmd (plist-get def :command)))
+ (if (symbolp loc)
+ (eq cmd loc)
+ (equal (transient--kbd
+ (or (plist-get def :key)
+ (transient--command-key cmd)))
+ loc)))))
(aref group 3)))
(defun transient--kbd (keys)
- [elpa] externals/transient f88dbc4331 212/366: transient-suffix-object: Support all suffixes, (continued)
- [elpa] externals/transient f88dbc4331 212/366: transient-suffix-object: Support all suffixes, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 4a2b7fdf75 220/366: Add .elpaignore, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 90e640fe8f 225/366: Bump copyright years, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 691d10f465 231/366: Fix doc-string typo, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient e91ad31f8a 234/366: transient--debug: Show this-command-keys, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 9ca983bab2 238/366: Release version 0.3.0, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient eff65f1d85 243/366: Revert "manual: Deal with texinfo cross reference idiocy", Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient ed4809afb8 255/366: make: Set VERSION, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 1e74060854 270/366: transient-map: Bind C-u to universal-argument, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient f5e600d3f4 284/366: transient-init-value: Fix typo in doc-strings, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient ed992c58cd 094/366: Properly handle existing string pseudo suffixes,
Jonas Bernoulli <=
- [elpa] externals/transient 2eff8d57e8 096/366: Add .github/FUNDING.yml, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 01a166fcb8 097/366: Declare variable alias before its referent, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 8232a0aaa2 098/366: manual: Do not require unused magit-utils and org-man, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 68f31ed34f 104/366: manual: Fix broken export rendering by org mistaking `=' for markup, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient d33fe5abaf 101/366: Split new transient-get-value from transient-args, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 7bf97594a5 110/366: transient-infix-read: Bugfix, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 79a72db95f 117/366: Fix typos, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 89e6941a85 111/366: transient-undefined: Make some noise, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 617844abe5 121/366: transient-undefined: Also show the command, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient a1525bb992 124/366: transient--emergency-exit: Improve doc-string, Jonas Bernoulli, 2022/01/25