[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient 81a108ba03 2/7: transient--parse-suffix: Avoi
|
From: |
Jonas Bernoulli |
|
Subject: |
[elpa] externals/transient 81a108ba03 2/7: transient--parse-suffix: Avoid overly long symbol names |
|
Date: |
Tue, 23 Jan 2024 09:23:46 -0500 (EST) |
branch: externals/transient
commit 81a108ba03c8c0cee9d455cfc7c0804c850cb99a
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
transient--parse-suffix: Avoid overly long symbol names
We already fall back to making the suffix's key part of the name of
the command, when its description is a lambda. Do the same if it is
a named function, and if it is a string, then only use it if it is
less than 16 characters long.
(As a side-note, using the description has the advantage that more
meaningful symbols appear in backtraces. While falling back to using
the key, is less meaningful (and users may change the key, leading to
a mismatch), it is still much more useful than using `gensym'.)
---
lisp/transient.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/transient.el b/lisp/transient.el
index 48b180aec4..bc2fde7d10 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1140,7 +1140,8 @@ this case, because the `man-page' slot was not set in
this case."
(format "transient:%s:%s"
prefix
(let ((desc (plist-get args :description)))
- (if (and desc (or (stringp desc) (symbolp desc)))
+ (if (and (stringp desc)
+ (length< desc 16))
desc
(plist-get args :key)))))))
(setq args (plist-put
- [elpa] externals/transient updated (f51c144a47 -> 522b625cf3), Jonas Bernoulli, 2024/01/23
- [elpa] externals/transient 81a108ba03 2/7: transient--parse-suffix: Avoid overly long symbol names,
Jonas Bernoulli <=
- [elpa] externals/transient 9d8f361f6a 4/7: transient--wrap-command: Bind debugger, Jonas Bernoulli, 2024/01/23
- [elpa] externals/transient 522b625cf3 7/7: Use a dedicated symbol to hide from read-extended-command, Jonas Bernoulli, 2024/01/23
- [elpa] externals/transient a678d61406 6/7: Hide suffix-only commands from read-extended-command, Jonas Bernoulli, 2024/01/23
- [elpa] externals/transient 9a3e1a4469 1/7: Add signage to emergency exits, Jonas Bernoulli, 2024/01/23
- [elpa] externals/transient 194139cdfd 3/7: transient--wrap-command: Reindent, Jonas Bernoulli, 2024/01/23
- [elpa] externals/transient f451708605 5/7: Use completion-predicate symbol property instead of command-modes, Jonas Bernoulli, 2024/01/23