[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient f451708605 5/7: Use completion-predicate symb
From: |
Jonas Bernoulli |
Subject: |
[elpa] externals/transient f451708605 5/7: Use completion-predicate symbol property instead of command-modes |
Date: |
Tue, 23 Jan 2024 09:23:46 -0500 (EST) |
branch: externals/transient
commit f4517086053dea6eb56103061fabbe636ffe5aa4
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Use completion-predicate symbol property instead of command-modes
It is a more natural fit but didn't exist yet when I first learned
about this feature. Both properties were introduced in Emacs 28.1.
---
lisp/transient.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lisp/transient.el b/lisp/transient.el
index f618564cf7..5e7d2759f5 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -1007,7 +1007,7 @@ keyword.
`(progn
(defalias ',name #'transient--default-infix-command)
(put ',name 'interactive-only t)
- (put ',name 'command-modes (list 'not-a-mode))
+ (put ',name 'completion-predicate #'ignore)
(put ',name 'function-documentation ,docstr)
(put ',name 'transient--suffix
(,(or class 'transient-switch) :command ',name ,@slots)))))
@@ -1037,7 +1037,7 @@ this case, because the `man-page' slot was not set in
this case."
(transient-infix-set obj (transient-infix-read obj)))
(transient--show))
(put 'transient--default-infix-command 'interactive-only t)
-(put 'transient--default-infix-command 'command-modes (list 'not-a-mode))
+(put 'transient--default-infix-command 'command-predicate #'ignore)
(eval-and-compile
(defun transient--expand-define-args (args &optional arglist)
@@ -1148,7 +1148,7 @@ this case, because the `man-page' slot was not set in
this case."
args :command
`(prog1 ',sym
(put ',sym 'interactive-only t)
- (put ',sym 'command-modes (list 'not-a-mode))
+ (put ',sym 'command-predicate #'ignore)
(defalias ',sym
,(if (eq (car-safe cmd) 'lambda)
cmd
@@ -1171,7 +1171,7 @@ this case, because the `man-page' slot was not set in
this case."
args :command
`(prog1 ',sym
(put ',sym 'interactive-only t)
- (put ',sym 'command-modes (list 'not-a-mode))
+ (put ',sym 'command-predicate #'ignore)
(defalias ',sym #'transient--default-infix-command))))
(cond ((and car (not (keywordp car)))
(setq class 'transient-option)
- [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, 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 <=