branch: externals/transient commit ec20c0b65dcc3b274c124c15b0dcca01cf91ce4c Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
manual: Improve suffix pre-command documentation --- docs/transient.org | 13 ++++++++++++- docs/transient.texi | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/docs/transient.org b/docs/transient.org index 37845403af..b07b5f2fc9 100644 --- a/docs/transient.org +++ b/docs/transient.org @@ -1318,7 +1318,18 @@ function that makes sense for infixes. :UNNUMBERED: notoc :END: -The default for suffixes is ~transient--do-exit~. +By default, invoking a suffix causes the transient to be exited. + +If you want a different default behavior for a certain transient +prefix command, then set its ~:transient-suffix~ slot. The value can be +a boolean, answering the question "does the transient stay active, +when a suffix command is invoked?" ~t~ means that the transient stays +active, while ~nil~ means that invoking a suffix exits the transient. +In either case, the exact behavior depends on whether the suffix is +itself a prefix (i.e., a sub-prefix), an infix or a regular suffix. + +The behavior for an individual suffix command can be changed by +setting its ~transient~ slot to one of the following pre-commands. - Function: transient--do-exit :: diff --git a/docs/transient.texi b/docs/transient.texi index 2b882d1725..157c866511 100644 --- a/docs/transient.texi +++ b/docs/transient.texi @@ -1535,7 +1535,18 @@ Call the command without exporting variables and stay transient. @anchor{Pre-commands for Suffixes} @subheading Pre-commands for Suffixes -The default for suffixes is @code{transient--do-exit}. +By default, invoking a suffix causes the transient to be exited. + +If you want a different default behavior for a certain transient +prefix command, then set its @code{:transient-suffix} slot. The value can be +a boolean, answering the question "does the transient stay active, +when a suffix command is invoked?" @code{t} means that the transient stays +active, while @code{nil} means that invoking a suffix exits the transient. +In either case, the exact behavior depends on whether the suffix is +itself a prefix (i.e., a sub-prefix), an infix or a regular suffix. + +The behavior for an individual suffix command can be changed by +setting its @code{transient} slot to one of the following pre-commands. @defun transient--do-exit Call the command after exporting variables and exit the transient.