Function: transient-define-suffix
transient-define-suffix is a macro defined in transient.el.
Signature
(transient-define-suffix NAME ARGLIST [DOCSTRING] [KEYWORD VALUE]... [BODY...])
Documentation
Define NAME as a transient suffix command.
ARGLIST are the arguments that the command takes. DOCSTRING is the documentation string and is optional.
These arguments can optionally be followed by key-value pairs.
Each key has to be a keyword symbol, either :class or a
keyword argument supported by the constructor of that class.
The transient-suffix(var)/transient-suffix(fun) class is used if the class is not
specified explicitly.
The BODY must begin with an interactive form that matches
ARGLIST. The infix arguments are usually accessed by using
transient-args inside interactive.
Source Code
;; Defined in ~/.emacs.d/elpa/transient-20260414.1009/transient.el
(defmacro transient-define-suffix (name arglist &rest args)
"Define NAME as a transient suffix command.
ARGLIST are the arguments that the command takes.
DOCSTRING is the documentation string and is optional.
These arguments can optionally be followed by key-value pairs.
Each key has to be a keyword symbol, either `:class' or a
keyword argument supported by the constructor of that class.
The `transient-suffix' class is used if the class is not
specified explicitly.
The BODY must begin with an `interactive' form that matches
ARGLIST. The infix arguments are usually accessed by using
`transient-args' inside `interactive'.
\(fn NAME ARGLIST [DOCSTRING] [KEYWORD VALUE]... [BODY...])"
(declare (debug ( &define name lambda-list
[&optional lambda-doc]
[&rest keywordp sexp]
[&optional ("interactive" interactive) def-body]))
(indent defun)
(doc-string 3))
(pcase-let
((`(,class ,slots ,_ ,docstr ,body ,interactive-only)
(transient--expand-define-args args arglist 'transient-define-suffix)))
`(progn
(defalias ',name
,(if (and (not body) class (oref-default class definition))
`(oref-default ',class definition)
`(lambda ,arglist ,@body)))
:autoload-end
(put ',name 'interactive-only ,interactive-only)
(put ',name 'function-documentation ,docstr)
(put ',name 'transient--suffix
(,(or class 'transient-suffix) :command ',name ,@slots)))))