branch: externals/transient commit 73694be44a802cac89bfe0798e2a4aeb79e39ead Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
transient-infix-read: Support use by regular commands --- lisp/transient.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/transient.el b/lisp/transient.el index c8312999e3..950822b917 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -2411,6 +2411,13 @@ The last value is \"don't use any of these switches\"." (cadr (member value choices)) (car choices)))) +(cl-defmethod transient-infix-read ((command symbol)) + "Elsewhere use the reader of the infix command COMMAND. +Use this if you want to share an infix's history with a regular +stand-alone command." + (cl-letf (((symbol-function #'transient--show) #'ignore)) + (transient-infix-read (get command 'transient--suffix)))) + ;;;; Readers (defun transient-read-directory (prompt _initial-input _history)