[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient a678d61406 6/7: Hide suffix-only commands fro
|
From: |
Jonas Bernoulli |
|
Subject: |
[elpa] externals/transient a678d61406 6/7: Hide suffix-only commands from read-extended-command |
|
Date: |
Tue, 23 Jan 2024 09:23:46 -0500 (EST) |
branch: externals/transient
commit a678d61406265100c7ab4d2bb8d040c4bc61de8b
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Hide suffix-only commands from read-extended-command
---
lisp/transient.el | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/lisp/transient.el b/lisp/transient.el
index 5e7d2759f5..c84ac8f65d 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1209,6 +1209,17 @@ this case, because the `man-page' slot was not set in
this case."
(and (string-match "\\`\\(-[a-zA-Z]\\)\\(\\'\\|=\\)" arg)
(match-string 1 arg))))
+(defun transient-command-completion-not-ignored-p (symbol _buffer)
+ "Say whether SYMBOL should be offered as a completion.
+If the value of SYMBOL's `completion-predicate' property is
+`ignore', then return nil, otherwise return t."
+ (not (eq (get symbol 'completion-predicate) 'ignore)))
+
+(static-if (and (boundp 'read-extended-command-predicate) ; since Emacs 28.1
+ (not read-extended-command-predicate))
+ (setq read-extended-command-predicate
+ 'transient-command-completion-not-ignored-p))
+
(defun transient-parse-suffix (prefix suffix)
"Parse SUFFIX, to be added to PREFIX.
PREFIX is a prefix command, a symbol.
- [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, 2024/01/23
- [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 <=
- [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